diff options
Diffstat (limited to 'app/controllers/nodes_controller.rb')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index 09d0c52..07bbbac 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -43,7 +43,12 @@ class NodesController < ApplicationController | |||
| 43 | end | 43 | end |
| 44 | 44 | ||
| 45 | def edit | 45 | def edit |
| 46 | @draft = @node.find_or_create_draft( current_user ) | 46 | begin |
| 47 | @draft = @node.find_or_create_draft( current_user ) | ||
| 48 | rescue LockedByAnotherUser | ||
| 49 | flash[:error] = "Page is locked by another user who is working on it!" | ||
| 50 | redirect_to :back | ||
| 51 | end | ||
| 47 | end | 52 | end |
| 48 | 53 | ||
| 49 | def update | 54 | def update |
