aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_view/helpers.rb4
-rw-r--r--actionpack/lib/action_view/helpers/active_model_helper.rb (renamed from actionpack/lib/action_view/helpers/active_record_helper.rb)2
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
-rw-r--r--actionpack/test/template/active_record_helper_i18n_test.rb2
-rw-r--r--actionpack/test/template/active_record_helper_test.rb2
5 files changed, 5 insertions, 7 deletions
diff --git a/actionpack/lib/action_view/helpers.rb b/actionpack/lib/action_view/helpers.rb
index 97fa2d80e9..c1c0eb59ae 100644
--- a/actionpack/lib/action_view/helpers.rb
+++ b/actionpack/lib/action_view/helpers.rb
@@ -1,6 +1,6 @@
module ActionView #:nodoc:
module Helpers #:nodoc:
- autoload :ActiveRecordHelper, 'action_view/helpers/active_record_helper'
+ autoload :ActiveModelHelper, 'action_view/helpers/active_model_helper'
autoload :AssetTagHelper, 'action_view/helpers/asset_tag_helper'
autoload :AtomFeedHelper, 'action_view/helpers/atom_feed_helper'
autoload :BenchmarkHelper, 'action_view/helpers/benchmark_helper'
@@ -31,7 +31,7 @@ module ActionView #:nodoc:
include SanitizeHelper::ClassMethods
end
- include ActiveRecordHelper
+ include ActiveModelHelper
include AssetTagHelper
include AtomFeedHelper
include BenchmarkHelper
diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_model_helper.rb
index 409b27de73..0f122d9232 100644
--- a/actionpack/lib/action_view/helpers/active_record_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_model_helper.rb
@@ -15,7 +15,7 @@ module ActionView
# method that creates a complete form for all the basic content types of the record (not associations or aggregations, though). This
# is a great way of making the record quickly available for editing, but likely to prove lackluster for a complicated real-world form.
# In that case, it's better to use the +input+ method and the specialized +form+ methods in link:classes/ActionView/Helpers/FormHelper.html
- module ActiveRecordHelper
+ module ActiveModelHelper
# Returns a default input tag for the type of object returned by the method. For example, if <tt>@post</tt>
# has an attribute +title+ mapped to a +VARCHAR+ column that holds "Hello World":
#
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 2b39d08035..2d1d19d5f3 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -1044,8 +1044,6 @@ module ActionView
end
def fields_for_nested_model(name, object, args, block)
- object = convert_to_model(object)
-
if object.new_record?
@template.fields_for(name, object, *args, &block)
else
diff --git a/actionpack/test/template/active_record_helper_i18n_test.rb b/actionpack/test/template/active_record_helper_i18n_test.rb
index 7dda9fe275..63032e4e5c 100644
--- a/actionpack/test/template/active_record_helper_i18n_test.rb
+++ b/actionpack/test/template/active_record_helper_i18n_test.rb
@@ -2,7 +2,7 @@ require 'abstract_unit'
class ActiveRecordHelperI18nTest < Test::Unit::TestCase
include ActionView::Context
- include ActionView::Helpers::ActiveRecordHelper
+ include ActionView::Helpers::ActiveModelHelper
attr_reader :request
diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb
index 950072e45b..c1bbdae8fb 100644
--- a/actionpack/test/template/active_record_helper_test.rb
+++ b/actionpack/test/template/active_record_helper_test.rb
@@ -1,7 +1,7 @@
require 'abstract_unit'
class ActiveRecordHelperTest < ActionView::TestCase
- tests ActionView::Helpers::ActiveRecordHelper
+ tests ActionView::Helpers::ActiveModelHelper
silence_warnings do
class Post < Struct.new(:title, :author_name, :body, :secret, :written_on)