Class: Adm::BackersController
- Inherits:
-
BaseController
- Object
- BaseController
- Adm::BackersController
- Defined in:
- app/controllers/adm/backers_controller.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.backer_actions ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/adm/backers_controller.rb', line 15 def self.backer_actions %w[confirm pendent refund hide cancel push_to_trash].each do |action| define_method action do resource.send(action) flash[:notice] = I18n.t("adm.backers.messages.successful.#{action}") redirect_to adm_backers_path(params[:local_params]) end end end |
Instance Method Details
#change_reward ⇒ Object
26 27 28 29 30 |
# File 'app/controllers/adm/backers_controller.rb', line 26 def change_reward resource.change_reward! params[:reward_id] flash[:notice] = I18n.t('adm.backers.messages.successful.change_reward') redirect_to adm_backers_path(params[:local_params]) end |