From 334983eca042b5016d3d79d7ed5761b60ba871ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodri=CC=81guez=20Troitin=CC=83o?= Date: Mon, 15 Mar 2010 19:11:46 +0100 Subject: Recovers error_messages for ActiveRecordInstanceTag. [#4078 state:resolved] Signed-off-by: wycats --- actionpack/lib/action_view/helpers/active_model_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/lib/action_view/helpers/active_model_helper.rb') diff --git a/actionpack/lib/action_view/helpers/active_model_helper.rb b/actionpack/lib/action_view/helpers/active_model_helper.rb index e3db2923f7..bbe8609e91 100644 --- a/actionpack/lib/action_view/helpers/active_model_helper.rb +++ b/actionpack/lib/action_view/helpers/active_model_helper.rb @@ -295,6 +295,10 @@ module ActionView end end + def error_message + object.errors[@method_name] + end + def column_type object.send(:column_for_attribute, @method_name).type end -- cgit v1.2.3