Class: Boxroom::AdminsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Boxroom::AdminsController
- Includes:
- BaseController
- Defined in:
- app/controllers/boxroom/admins_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/boxroom/admins_controller.rb', line 12 def create @user = User.new(permitted_params.user) @user.password_required = true @user.is_admin = true if @user.save redirect_to new_session_url, :notice => t(:admin_user_created_successfully) else render :action => 'new' end end |
#new ⇒ Object
8 9 10 |
# File 'app/controllers/boxroom/admins_controller.rb', line 8 def new @user = User.new end |