aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/record_identifier.rb2
-rw-r--r--actionpack/test/template/form_helper_test.rb10
2 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/record_identifier.rb b/actionpack/lib/action_controller/record_identifier.rb
index 2def78b51a..c11d676c5e 100644
--- a/actionpack/lib/action_controller/record_identifier.rb
+++ b/actionpack/lib/action_controller/record_identifier.rb
@@ -40,7 +40,7 @@ module ActionController
# dom_class(post, :edit) # => "edit_post"
# dom_class(Person, :edit) # => "edit_person"
def dom_class(record_or_class, prefix = nil)
- singular = ActiveModel::Naming.singular(record_or_class)
+ singular = ActiveModel::Naming.param_key(record_or_class)
prefix ? "#{prefix}#{JOIN}#{singular}" : singular
end
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index f2a49f7a68..5296556fe6 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -696,13 +696,13 @@ class FormHelperTest < ActionView::TestCase
concat f.submit('Edit post')
end
- expected =
- "<form accept-charset='UTF-8' action='/posts/44' method='post'>" +
- snowman +
- "<label for='post_title'>The Title</label>" +
+ expected = whole_form("/posts/44", "edit_post_44" , "edit_post", :method => "put") do
"<input name='post[title]' size='30' type='text' id='post_title' value='And his name will be forty and four.' />" +
- "<input name='commit' id='post_submit' type='submit' value='Edit post' />" +
+ "<input name='commit' type='submit' value='Edit post' />" +
"</form>"
+ end
+
+ assert_dom_equal expected, output_buffer
end
def test_form_for_with_symbol_object_name