Class: Nquery::RegistrationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Nquery::RegistrationsController
- Defined in:
- app/controllers/nquery/registrations_controller.rb
Constant Summary
Constants included from AuthorizesCollection
AuthorizesCollection::COLLECTION_REQUIREMENTS
Instance Method Summary collapse
Methods included from Breadcrumbs
#breadcrumbs, #set_breadcrumbs
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/nquery/registrations_controller.rb', line 13 def create @user = User.new(registration_params) if @user.save @user.ensure_all_users_membership! @user.ensure_personal_collection! session[:nquery_user_id] = @user.id redirect_to root_path, notice: "Welcome to nquery!" else render :new, status: :unprocessable_content end end |
#new ⇒ Object
8 9 10 11 |
# File 'app/controllers/nquery/registrations_controller.rb', line 8 def new redirect_to root_path if current_nquery_user @user = User.new end |