From d57bd479f9cef67d78550cc8395f9e2ed1c53eb3 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Tue, 9 Nov 2010 15:51:21 +0100 Subject: [PATCH] fix failing test for some error messages --- app/models/project.rb | 2 +- config/environment.rb | 2 +- config/locales/en.yml | 12 +++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 1860a51b..50845278 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -38,7 +38,7 @@ class Project < ActiveRecord::Base validates_presence_of :name validates_length_of :name, :maximum => 255 - validates_uniqueness_of :name, :scope =>"user_id" + validates_uniqueness_of :name, :scope => "user_id" validates_does_not_contain :name, :string => ',' acts_as_list :scope => 'user_id = #{user_id} AND state = \'#{state}\'' diff --git a/config/environment.rb b/config/environment.rb index d14d4087..55352f15 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -64,7 +64,7 @@ Rails::Initializer.run do |config| # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de - + # See Rails::Configuration for more options if ( SITE_CONFIG['authentication_schemes'].include? 'cas') #requires rubycas-client gem to be installed diff --git a/config/locales/en.yml b/config/locales/en.yml index 81044f29..9ab0fe94 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3,11 +3,13 @@ en: errors: models: project: - name: - blank: "project must have a name" - too_long: "project name must be less than 256 characters" - taken: "already exists" - invalid: "cannot contain the comma (',') character" + attributes: + name: + blank: "project must have a name" + too_long: "project name must be less than 256 characters" + taken: "already exists" + messages: + invalid: "cannot contain the comma (',') character" attributes: user: first_name: "First name"