From 24265260b216e2be8d29d913c4d0396408981612 Mon Sep 17 00:00:00 2001 From: hukl Date: Fri, 11 Sep 2009 13:08:27 +0200 Subject: enhanced LockedByAnotherUser exception which now includes a message showing the last modified time. Closes #13 --- app/controllers/nodes_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/nodes_controller.rb') 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 def edit begin @draft = @node.find_or_create_draft( current_user ) - rescue LockedByAnotherUser - flash[:error] = "Page is locked by another user who is working on it!" + rescue LockedByAnotherUser => e + flash[:error] = e.message redirect_to :back end end -- cgit v1.3