diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-08-06 23:42:11 -0300 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-08-06 23:42:11 -0300 |
commit | 4ac9d391d337d5a05a7aa93849405e21dd4bbf01 (patch) | |
tree | 1b37c4b395f8d2f43fc453c5c2cd06ff7b59ddc2 /actionpack/lib/action_view/helpers/form_helper.rb | |
parent | 0435178ff896e9b3854cb53cbd9fbd33a8f78209 (diff) | |
download | rails-4ac9d391d337d5a05a7aa93849405e21dd4bbf01.tar.gz rails-4ac9d391d337d5a05a7aa93849405e21dd4bbf01.tar.bz2 rails-4ac9d391d337d5a05a7aa93849405e21dd4bbf01.zip |
Improve a path in _render_partial
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 2d1d19d5f3..6e2990e084 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -932,6 +932,10 @@ module ActionView attr_accessor :object_name, :object, :options + def self.model_name + @model_name ||= Struct.new(:partial_path).new(name.demodulize.underscore.sub!(/_builder$/, '')) + end + def initialize(object_name, object, template, options, proc) @nested_child_index = {} @object_name, @object, @template, @options, @proc = object_name, object, template, options, proc |