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
$(document).ready(function(){ | |
$("#id_country_code").change(function(){ | |
var option = $(this).val(); | |
$.ajax({ | |
type: "GET", | |
url: "/models/get", | |
data:{ | |
key: option | |
}, | |
success: function(response){ |
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
@day = BusinessProfile.where(:user_id => current_user).pluck(:days) | |
@days = @day.first | |
@days = @days.split(',') |
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
def authenticate_any! | |
if user_signed_in? | |
true | |
else | |
authenticate_account! | |
end | |
end |
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
def proceed | |
@domain_from_form = params[:search][:q] | |
@domain_search = User.pluck(:subdomain) | |
@domain_present = @domain_search.include? @domain_from_form | |
if @domain_present == true | |
redirect_to "http://#{@domain_from_form}.lvh.me:3000/accounts/sign_in" | |
else | |
redirect_to resub_index_path | |
end | |
end |
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
<p>Welcome <%= @email.split('@')[0].capitalize %>!</p> | |
<p>Your Mail is Verified ! You can procees your signing Up By clicking the link below.</p> | |
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token, subdomain: Apartment::Tenant.current) %></p> |
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
def days=(value) | |
return super value.reject!(&:blank?).join(", ") if value.is_a?(Array) | |
super | |
end |
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
<div class="field"> | |
<%= label_tag 'days_monday', 'Monday' %> | |
<%= check_box_tag 'business_pro[days][]','Monday',checked('pop'), id: 'days_monday' %> | |
<%= label_tag 'days_tuesday', 'Tuesday' %> | |
<%= check_box_tag 'business_pro[days][]','Tuesday',checked('pop'), id: 'days_tuesday' %> | |
<%= label_tag 'days_wednesday', 'Wednesday' %> | |
<%= check_box_tag 'business_pro[days][]','Wednesday',checked('pop'), id: 'days_wednesday' %> | |
</div> |
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
@post.user = current_user |
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
@user = User.find(id) | |
@user.admin = true | |
@user.save! |
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
<%= @posts.user.email.split('@')[0].capitalize %> |