Class: Miniblog::Admin::TransitionsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- Miniblog::ApplicationController
- BaseController
- Miniblog::Admin::TransitionsController
- Defined in:
- app/controllers/miniblog/admin/transitions_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Methods inherited from Miniblog::ApplicationController
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Miniblog::ApplicationController
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/miniblog/admin/transitions_controller.rb', line 6 def create namespace = '_as_publisher' if current_user.is_publisher? @post.send "#{params[:transition]}#{namespace}" status = @post.status_change_records.build(user: current_user, state: params[:transition]) status.save redirect_to admin_posts_path end |