diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-01 19:32:22 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-01 19:32:22 -0300 |
commit | fb0bd8c1092db51888ec4bb72af6c595e13c31fa (patch) | |
tree | 22b264d2259043b1d4b922527cb2b611c3baf67a /actionpack/lib/action_view/helpers/form_helper.rb | |
parent | f78de6864998369002a5b1906dad151b6c787c24 (diff) | |
download | rails-fb0bd8c1092db51888ec4bb72af6c595e13c31fa.tar.gz rails-fb0bd8c1092db51888ec4bb72af6c595e13c31fa.tar.bz2 rails-fb0bd8c1092db51888ec4bb72af6c595e13c31fa.zip |
Makes form_helper use overriden model accessors
[#3374 state:committed]
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index b0af836522..f8e60faa2a 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -1005,9 +1005,9 @@ module ActionView def value_before_type_cast(object, method_name) unless object.nil? - object.respond_to?(method_name + "_before_type_cast") ? - object.send(method_name + "_before_type_cast") : - object.send(method_name) + object.respond_to?(method_name) ? + object.send(method_name) : + object.send(method_name + "_before_type_cast") end end |