Class: V2Users::UsersController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- ApplicationV2Controller
- BaseController
- V2Users::UsersController
- Defined in:
- app/controllers/v2_users/users_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
#activate_cache?, #current_user_ck, default_url_options, #identity_cache_memoization, #set_csrf_token
Methods included from LogrageCustomLogger
Methods included from UpdateLocaleConcern
Methods included from ResponseCacheConcern
Methods included from AdminHelper
#dynamic_pricings_formatter, #link_to_admin_reservations_path_by_id, #link_to_admin_restaurants_path_by_id, #link_to_log, #optional_locales, #optional_locales_with_labels, #staff_signed_in?
Methods inherited from ApplicationV2Controller
Instance Method Details
#notification_params ⇒ Object
19 20 21 |
# File 'app/controllers/v2_users/users_controller.rb', line 19 def notification_params params.require(:user).permit(:transaction_unsubscribe_reason, :transaction_unsubscribe_reason_other) end |
#update_notifications ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/v2_users/users_controller.rb', line 9 def update_notifications user = User.find params[:id] if user.update notification_params.merge(subscribe_transaction_email: false) flash.now[:notice] = 'Unsubscribe notifications success' else flash.now[:alert] = "Something went wrong" end redirect_to root_path end |