Class: FlyAdmin::Imbs::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- FlyAdmin::Imbs::ApplicationController
- Defined in:
- app/controllers/fly_admin/imbs/application_controller.rb
Instance Method Summary collapse
Instance Method Details
#block_user ⇒ Object
8 9 10 |
# File 'app/controllers/fly_admin/imbs/application_controller.rb', line 8 def block_user render_blocked if session[:blocked] end |
#check_user_status ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/fly_admin/imbs/application_controller.rb', line 16 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
29 30 31 32 33 |
# File 'app/controllers/fly_admin/imbs/application_controller.rb', line 29 def paysite = session['action_type'] || 'wap' country = I18n.locale.to_s = SiteCache.read("content_#{paysite}_#{country}") end |
#store_link_param ⇒ Object
12 13 14 |
# File 'app/controllers/fly_admin/imbs/application_controller.rb', line 12 def store_link_param session[:link] = params[:link] if params[:link].present? end |