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
[ | |
["Адыгея Республика", "Europe/Moscow"], | |
["Алтай Республика", "Asia/Omsk"], | |
["Алтайский Край", "Asia/Omsk"], | |
["Амурская Область", "Asia/Yakutsk"], | |
["Астраханская Область", "Europe/Volgograd"], | |
["Байконур Город", "Asia/Qyzylorda"], | |
["Белгородская Область", "Europe/Moscow"], | |
["Брянская Область", "Europe/Moscow"], | |
["Владимирская Область", "Europe/Moscow"], |
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
To after_sign_in_path_for(resource) in ApplicationController | |
if request.env['HTTP_REFERER'] | |
begin | |
route_params = Rails.application.routes.recognize_path(URI(request.referrer).path, {method: :get}) | |
if route_params[:controller].include?('devise') | |
root_path | |
else | |
request.env['HTTP_REFERER'] | |
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
module ConcernName | |
extend ActiveSupport::Concern | |
included do | |
# Object methods go here | |
end | |
module ClassMethods | |
# Class methods go here | |
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
.twitter-typeahead { | |
display: block !important; | |
} | |
.twitter-typeahead .tt-query, | |
.twitter-typeahead .tt-hint { | |
margin-bottom: 0; | |
} | |
.tt-hint { | |
color: #999; | |
} |
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
1. Add deleted_at column to User model. | |
2. Add to User model: | |
def soft_delete | |
update_attribute(:deleted_at, Time.current) | |
end | |
def active_for_authentication? | |
super && !self.deleted_at | |
end |