Commit 00b6eed08df47e0afd1e7e0b3ecfcd2ae5a019b0
1 parent
51e4c391
Exists in
master
and in
22 other branches
Do not interpolate variable into error message from Article validation
- Adding draft of how to install deps to Rails 2.3.5 in HACKING.rails235 file - All units tests should inherits from ActiveSupport::TestCase
Showing
3 changed files
with
16 additions
and
2 deletions
Show diff stats
... | ... | @@ -0,0 +1,14 @@ |
1 | +This is a draft of how to create a environment to Rails 2.3.5 to Noosfero | |
2 | +development. | |
3 | + | |
4 | +Install dependencies: | |
5 | + | |
6 | +gem install rails -v 2.3.5 | |
7 | +gem install ferret | |
8 | +gem install i18n | |
9 | +gem install will_paginate | |
10 | +gem install cucumber | |
11 | + | |
12 | +Creating initial environment: | |
13 | + | |
14 | +rake db:schema:load | ... | ... |
app/models/article.rb
... | ... | @@ -13,7 +13,7 @@ class Article < ActiveRecord::Base |
13 | 13 | validates_presence_of :profile_id, :name |
14 | 14 | validates_presence_of :slug, :path, :if => lambda { |article| !article.name.blank? } |
15 | 15 | |
16 | - validates_uniqueness_of :slug, :scope => ['profile_id', 'parent_id'], :message => N_('<!-- %{fn} -->The title (article name) is already being used by another article, please use another title.'), :if => lambda { |article| !article.slug.blank? } | |
16 | + validates_uniqueness_of :slug, :scope => ['profile_id', 'parent_id'], :message => N_('The title (article name) is already being used by another article, please use another title.'), :if => lambda { |article| !article.slug.blank? } | |
17 | 17 | |
18 | 18 | belongs_to :last_changed_by, :class_name => 'Person', :foreign_key => 'last_changed_by_id' |
19 | 19 | ... | ... |