Class: My::ProfilesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- My::ProfilesController
- Includes:
- Authentication
- Defined in:
- app/controllers/my/profiles_controller.rb
Overview
Controller for registration and profile management
Instance Method Summary collapse
-
#check ⇒ Object
post /my/profile/check.
-
#create ⇒ Object
post /my/profile.
-
#edit ⇒ Object
get /my/profile/edit.
-
#new ⇒ Object
get /my/profile/new.
-
#show ⇒ Object
get /my/profile.
-
#update ⇒ Object
patch /my/profile.
Methods included from Authentication
#create_token_for_user, #deactivate_token, #pop_token, #redirect_authenticated_user
Instance Method Details
#check ⇒ Object
post /my/profile/check
14 15 16 |
# File 'app/controllers/my/profiles_controller.rb', line 14 def check @entity = User.new(creation_parameters) end |
#create ⇒ Object
post /my/profile
26 27 28 29 30 31 32 |
# File 'app/controllers/my/profiles_controller.rb', line 26 def create if params[:agree] redirect_to root_path, alert: t('my.profiles.create.are_you_bot') else create_user end end |
#edit ⇒ Object
get /my/profile/edit
39 40 |
# File 'app/controllers/my/profiles_controller.rb', line 39 def edit end |
#new ⇒ Object
get /my/profile/new
19 20 21 22 23 |
# File 'app/controllers/my/profiles_controller.rb', line 19 def new @entity = User.new render :closed unless @handler.open? end |
#show ⇒ Object
get /my/profile
35 36 |
# File 'app/controllers/my/profiles_controller.rb', line 35 def show end |
#update ⇒ Object
patch /my/profile
43 44 45 46 47 48 49 50 51 |
# File 'app/controllers/my/profiles_controller.rb', line 43 def update @entity = current_user if @entity.update(user_parameters) flash[:notice] = t('my.profiles.update.success') form_processed_ok(my_path) else form_processed_with_error(:edit) end end |