Class: RubberRing::SessionsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- RubberRing::SessionsController
- Defined in:
- app/controllers/rubber_ring/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/rubber_ring/sessions_controller.rb', line 11 def create if params[:password] == RubberRing.admin_password session[:password] = params[:password] redirect_to main_app.root_path else flash.now[:error] = 'Wrong password' render :new end end |
#destroy ⇒ Object
6 7 8 9 |
# File 'app/controllers/rubber_ring/sessions_controller.rb', line 6 def destroy session[:password] = nil redirect_to main_app.root_path end |
#new ⇒ Object
3 4 |
# File 'app/controllers/rubber_ring/sessions_controller.rb', line 3 def new end |