Class: FlyAdmin::Imbs::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- FlyAdmin::Imbs::ApplicationController
- Defined in:
- app/controllers/fly_admin/imbs/application_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#block_user ⇒ Object
9 10 11 |
# File 'app/controllers/fly_admin/imbs/application_controller.rb', line 9 def block_user render_blocked if session[:blocked] end |
#check_user_status ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/fly_admin/imbs/application_controller.rb', line 17 def check_user_status user_is_valid = FlyAdmin::Imbs::ConnectionApi.check_user(current_user) if user_is_valid current_user.update_attributes is_active: true [:active_user] = { value: 1, expires: 1.day.from_now } else current_user.update_attributes is_active: false session[:blocked] = true render_blocked end end |
#load_footer ⇒ Object
30 31 32 33 34 |
# File 'app/controllers/fly_admin/imbs/application_controller.rb', line 30 def paysite = session['action_type'] || 'wap' country = I18n.locale.to_s @footer = SiteCache.read("content_#{paysite}_#{country}") end |
#store_link_param ⇒ Object
13 14 15 |
# File 'app/controllers/fly_admin/imbs/application_controller.rb', line 13 def store_link_param session[:link] = params[:link] if params[:link].present? end |