Class: RegistrationsController
- Inherits:
-
Devise::RegistrationsController
- Object
- Devise::RegistrationsController
- RegistrationsController
- Defined in:
- app/controllers/registrations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/registrations_controller.rb', line 14 def create @group = Group.find(params[:user][:requested_group]) if params[:user][:requested_group] super unless @user.new_record? Registrations.group_user_registration_email( @group, @user, edit_groups_user_url(@user.groups_users.last) ).deliver end end |
#index ⇒ Object
6 7 |
# File 'app/controllers/registrations_controller.rb', line 6 def index end |
#login ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/controllers/registrations_controller.rb', line 28 def login # redirected to here after AJAX login if user_signed_in? render :json => { :success => true, :user => { :login => current_user.login, :email => current_user.email}, :roles => current_roles.roles.collect(&:name) } else render :json => { :success => false, :user => {}, :roles => [] } end end |
#logout ⇒ Object
43 44 45 |
# File 'app/controllers/registrations_controller.rb', line 43 def logout render :nothing => true end |
#new ⇒ Object
9 10 11 12 |
# File 'app/controllers/registrations_controller.rb', line 9 def new @group = Group.find_by_name(params[:group]) super end |
#update ⇒ Object
24 25 26 |
# File 'app/controllers/registrations_controller.rb', line 24 def update super end |