Class: FlyAdmin::Imbs::MainController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- FlyAdmin::Imbs::MainController
- Defined in:
- app/controllers/fly_admin/imbs/main_controller.rb
Instance Method Summary collapse
- #authorize_customer(customer_key, password, login) ⇒ Object
- #enter ⇒ Object
- #test_request_headers ⇒ Object
- #you_blocked ⇒ Object
Instance Method Details
#authorize_customer(customer_key, password, login) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'app/controllers/fly_admin/imbs/main_controller.rb', line 19 def (customer_key, password, login) user = User.find_by_login(login) if user.nil? user = User.new( :login => login, :password => password, :customer_key => customer_key ) user.save end sign_in user unless user_signed_in? flash[:notice] = [ t('your_login') + " #{login}" ] flash[:notice] << "#{t('your_password')} #{password}" [:active_user] = { value: 1, expires: 1.day.from_now } redirect_to item_link end |
#enter ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/controllers/fly_admin/imbs/main_controller.rb', line 11 def enter if params[:operation_status] == 'deviceblock' redirect_to "#{root_url}&operation_status=deviceblock" and return end redirect_to paysite_root_url and return unless check_hash! params[:key], params[:pass], params[:login] end |
#test_request_headers ⇒ Object
7 8 9 |
# File 'app/controllers/fly_admin/imbs/main_controller.rb', line 7 def test_request_headers @env = request.env end |
#you_blocked ⇒ Object
4 5 |
# File 'app/controllers/fly_admin/imbs/main_controller.rb', line 4 def you_blocked end |