Class: Pageflow::EditLocksController Private
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Pageflow::EditLocksController
- Defined in:
- app/controllers/pageflow/edit_locks_controller.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #create ⇒ Object private
- #destroy ⇒ Object private
- #update ⇒ Object private
Instance Method Details
#create ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/pageflow/edit_locks_controller.rb', line 8 def create entry = Entry.find(params[:entry_id]) (:edit, entry) entry.edit_lock.acquire(current_user, edit_lock_params) entry.snapshot(creator: current_user) unless entry.feature_state('no_edit_lock_snapshot') respond_with(entry.reload.edit_lock, location: entry_edit_lock_url(entry)) end |
#destroy ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 29 |
# File 'app/controllers/pageflow/edit_locks_controller.rb', line 25 def destroy entry = Entry.find(params[:entry_id]) entry.edit_lock.release(current_user) head :no_content end |
#update ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 21 22 23 |
# File 'app/controllers/pageflow/edit_locks_controller.rb', line 18 def update entry = Entry.find(params[:entry_id]) (:edit, entry) entry.edit_lock.acquire(current_user, edit_lock_params) head :no_content end |