Class: Kuroko2ReadOnly::SettingsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Kuroko2ReadOnly::SettingsController
- Defined in:
- app/controllers/kuroko2_read_only/settings_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#show ⇒ Object
3 4 5 |
# File 'app/controllers/kuroko2_read_only/settings_controller.rb', line 3 def show @users = Kuroko2::User.where.not(id: current_user.id) end |
#update ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/kuroko2_read_only/settings_controller.rb', line 7 def update settings_params.each do |user_id, settings_param| user = Kuroko2::User.find(user_id) user.update!(read_only: settings_param[:read_only]) end flash[:success] = 'User ReadOnly change complete!!' redirect_to settings_path end |