diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-21 11:04:50 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-21 11:04:50 +0000 |
commit | fe28193e4eb9af2dc5262535a29ffde5249568fc (patch) | |
tree | bd4cf3a9fbada98e58e510ca0e25c42bf00676a7 /app/models/query.rb | |
parent | 9a986ac0a51fe844eee816325e6a6d4122136d9a (diff) | |
download | redmine-fe28193e4eb9af2dc5262535a29ffde5249568fc.tar.gz redmine-fe28193e4eb9af2dc5262535a29ffde5249568fc.zip |
Merged Rails 2.2 branch. Redmine now requires Rails 2.2.2.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2493 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 23742cfa5..84e127b6b 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -17,7 +17,7 @@ class QueryColumn attr_accessor :name, :sortable, :default_order - include GLoc + include Redmine::I18n def initialize(name, options={}) self.name = name @@ -26,7 +26,6 @@ class QueryColumn end def caption - set_language_if_valid(User.current.language) l("field_#{name}") end end @@ -113,7 +112,6 @@ class Query < ActiveRecord::Base def initialize(attributes = nil) super attributes self.filters ||= { 'status_id' => {:operator => "o", :values => [""]} } - set_language_if_valid(User.current.language) end def after_initialize @@ -123,7 +121,7 @@ class Query < ActiveRecord::Base def validate filters.each_key do |field| - errors.add label_for(field), :activerecord_error_blank unless + errors.add label_for(field), :blank unless # filter requires one or more values (values_for(field) and !values_for(field).first.blank?) or # filter doesn't require any value |