diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 | ||||
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 4aac69d45a..d89389338c 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed form helpers to query Model#id_before_type_cast instead of Model#id as a temporary workaround for Ruby 1.8.2 warnings #818 [DeLynn B] + * Fixed TextHelper#markdown to use blank? instead of empty? so it can deal with nil strings passed #814 [Johan Sörensen] * Added TextHelper#simple_format as a non-dependency text presentation helper #814 [Johan Sörensen] diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 32233d26d6..2f42a8a648 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -152,7 +152,7 @@ module ActionView @object_name, @method_name = object_name, method_name @template_object, @local_binding = template_object, local_binding if @object_name.sub!(/\[\]$/,"") - @auto_index = @template_object.instance_variable_get("@#{Regexp.last_match.pre_match}").id + @auto_index = @template_object.instance_variable_get("@#{Regexp.last_match.pre_match}").id_before_type_cast end end diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 7f7f473564..db5195e272 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -19,6 +19,7 @@ class FormHelperTest < Test::Unit::TestCase def @post.errors() Class.new{ def on(field) field == "author_name" end }.new end def @post.id; 123; end + def @post.id_before_type_cast; 123; end @post.title = "Hello World" @post.author_name = "" |