small medium large xlarge

04 May 2014, 19:24
Steve K2 (1 post)

I changed the message in the code on page 88. I get the following when I run “rake test:models”:

1) Failure: ProductTest#test_product_is_not_valid_without_a_unique_title [/Users/steve/railstuff/depot/test/models/product_test.rb:57]: — expected +++ actual @@ -1 +1 @@ -[“Title has already been taken”] +[“has already been taken”]

4 tests, 21 assertions, 1 failures, 0 errors, 0 skips

Why can’t I change the message text? Also, in the next (I18n) code sample:

assert_equal [I18n.translate(‘errors.messages.taken’)], products.errors[:title] —

is ‘errors.messages.taken’ a variable or something? Where is this defined?

This section is not at all clear - VERY CONFUSING!


You must be logged in to comment