Class: Pageflow::EditLocksController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Pageflow::EditLocksController
- Defined in:
- app/controllers/pageflow/edit_locks_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/controllers/pageflow/edit_locks_controller.rb', line 7 def create entry = Entry.find(params[:entry_id]) (:edit, entry) entry.edit_lock.aquire(current_user, edit_lock_params) entry.snapshot(:creator => current_user) respond_with(entry.reload.edit_lock, :location => entry_edit_lock_url(entry)) end |
#destroy ⇒ Object
22 23 24 25 26 |
# File 'app/controllers/pageflow/edit_locks_controller.rb', line 22 def destroy entry = Entry.find(params[:entry_id]) entry.edit_lock.release(current_user) head :no_content end |
#update ⇒ Object
15 16 17 18 19 20 |
# File 'app/controllers/pageflow/edit_locks_controller.rb', line 15 def update entry = Entry.find(params[:entry_id]) (:edit, entry) entry.edit_lock.aquire(current_user, edit_lock_params) head :no_content end |