This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RegistrationsController < Devise::RegistrationsController | |
respond_to :json | |
def create | |
build_resource | |
if resource.save | |
if resource.active_for_authentication? | |
set_flash_message :notice, :signed_up if is_navigational_format? | |
sign_in(resource_name, resource) | |
respond_to do |format| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- create.js.erb--> | |
<%- if @deal.errors.any? %> | |
console.log('Error'); | |
$('#dialog-form').html('<%= escape_javascript(render('deals/form')) %>'); | |
<%- else %> | |
console.log('Created'); | |
$('#dialog-form').dialog('close'); | |
$('#dialog-form').remove(); | |
$('#page-spinner').show(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="checkbox" id="zerotofour" value="0-4000">0-4000sq ft<br> | |
<input type="checkbox" id="fourtosix" value="4000-6000">4,000 to 6,000 sq ft<br> | |
<input type="checkbox" id="sixtofifty" value="6000-50000">6,000 to 50,000 sq ft<br> | |
<input type="checkbox" id="fiftyplus" value="50000-10000000">50,000 + sq ft<br> | |
<%= search_form_for(@search, :html => {:remote => true , :method => :get , :id=> "theFieldID"}) do |f|%> | |
<%=f.text_field :title_cont, :placeholder => "Search" , :class=> "span10", :id=>"prependedInput"%> | |
<%= f.text_field :measurements_gteq%> | |
<%= f.text_field :measurements_lteq%> | |
<%=f.link_to Listing.where('measurements > 0 AND measurements< 4000 OR measurements > 6000 AND measurements < 50000')%> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validates :title , :presence => true | |
validates :price , :presence => true | |
validates :description , :presence => true | |
validates :category , :presence => {:message=> "must be selected"} | |
validates :dimg1, :presence => {:message => "Your deal must have at least one image"} | |
<% @deal=Deal.new %> | |
<%= form_for(@deal,:html => {:"data-spinner" => "#user_form_spinner", :id=>"dialog-form"}, :remote=>true) do |f| %> | |
<div class="controls controls-row"> | |
<label class="control-label text-error" for="input01">Post Title*</label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= simple_form_for :conversation, url: :conversations do |f|%> | |
<%= f.input :recipients,:input_html => { :value => params[:deal_user_email] }%> | |
<div class="modal hide" id="messageModal"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal">×</button> | |
<h2 style="text-align:center">Contact </h2> | |
<h4 style="text-align:center">about </h4> | |
</div> | |
<div class="modal-body"> | |
<div class="control-group"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var do_on_load = function() { | |
var userName = ''; | |
var userEmail = ''; | |
$('.index-open-message').click(function() { | |
var userName = $(this).attr('data-deal-user-name'); | |
var userEmail = $(this).attr('data-deal-user-email'); | |
var dealTitle= $(this).attr('data-deal-title'); | |
console.log(userName); | |
$('.modal-header > h2').empty().append('Contact ' + userName) | |
$('input#conversation_recipients').attr('value', userEmail); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var do_on_load = function() { | |
var userName = ''; | |
var userEmail = ''; | |
$('.index-open-message').click(function() { | |
var userName = $(this).attr('data-deal-user-name'); | |
var userEmail = $(this).attr('data-deal-user-email'); | |
var dealTitle= $(this).attr('data-deal-title'); | |
console.log(userName); | |
$('.modal-header > h2').empty().append('Contact ' + userName) | |
$('input#conversation_recipients').attr('value', userEmail); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: | |
$(function() { | |
$('#event_from_date, #event_to_date, #repeat_days_ends').datepicker({ | |
dateFormat: "yy-mm-dd" | |
}); | |
$('#event_from_time, #event_to_time').timepicker(); | |
}); | |
#repeats-daily-modal class=['modal','hide','fade','in'] role='dialog' aria-labelledby='windowTitleLabel' | |
.modal-header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: | |
$(function() { | |
$('#event_from_date, #event_to_date, #repeat_days_ends').datepicker({ | |
dateFormat: "yy-mm-dd" | |
}); | |
$('#event_from_time, #event_to_time').timepicker(); | |
}); | |
#repeats-daily-modal class=['modal','hide','fade','in'] role='dialog' aria-labelledby='windowTitleLabel' | |
.modal-header |