Skip to content
This repository was archived by the owner on May 8, 2022. It is now read-only.

Conversation

@jebw
Copy link

@jebw jebw commented Apr 30, 2014

If a model name comes from the translations (ie User.class.model_name.human)
or if it has been supplied by the user (options[:object_name]) then show it
as is.

Only rewrite underscores if it has been derived from the supplied model, i.e.

error_messages_for :user

If a model name comes from the translations (ie User.class.model_name.human)
or if it has been supplied by the user (options[:object_name]) then show it
as is.

Only rewrite underscores if it has been derived from the supplied model, i.e.

  error_messages_for :user

# should space object name
assert_dom_equal %(<div class="error_explanation" id="error_explanation"><h2>2 errors prohibited this chunky bacon from being saved</h2><p>There were problems with the following fields:</p><ul><li>User email can't be empty</li><li>Author name can't be empty</li></ul></div>), error_messages_for(:user, :post, :object_name => "chunky_bacon")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing a test instead of adding one ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants