diff options
| author | hukl <contact@smyck.org> | 2009-09-11 13:08:27 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-11 13:08:27 +0200 |
| commit | 24265260b216e2be8d29d913c4d0396408981612 (patch) | |
| tree | d6406427fd274b67c9a38eddca2b61546d082c12 /app/controllers/nodes_controller.rb | |
| parent | b11433f789382822e4e4955e9344c01d64cee4df (diff) | |
enhanced LockedByAnotherUser exception which now includes a message showing the last modified time.
Closes #13
Diffstat (limited to 'app/controllers/nodes_controller.rb')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index 538e2f6..e442bd2 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -49,8 +49,8 @@ class NodesController < ApplicationController | |||
| 49 | def edit | 49 | def edit |
| 50 | begin | 50 | begin |
| 51 | @draft = @node.find_or_create_draft( current_user ) | 51 | @draft = @node.find_or_create_draft( current_user ) |
| 52 | rescue LockedByAnotherUser | 52 | rescue LockedByAnotherUser => e |
| 53 | flash[:error] = "Page is locked by another user who is working on it!" | 53 | flash[:error] = e.message |
| 54 | redirect_to :back | 54 | redirect_to :back |
| 55 | end | 55 | end |
| 56 | end | 56 | end |
