diff options
author | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2012-12-07 10:12:47 +0000 |
---|---|---|
committer | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2012-12-07 10:12:47 +0000 |
commit | 4896d5c7e83bb3cc7996c5ab09441c90e7cd9ce1 (patch) | |
tree | d3fabb5ab5a156ec53e28ebf938f03ddc165815a /app/models/version.rb | |
parent | 8201761e7732faa3933899653de5951dcbd6b27c (diff) | |
download | redmine-4896d5c7e83bb3cc7996c5ab09441c90e7cd9ce1.tar.gz redmine-4896d5c7e83bb3cc7996c5ab09441c90e7cd9ce1.zip |
Use lambda form in model scopes (#12499)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10949 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index dbcd317e9..07d312ab9 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -36,7 +36,7 @@ class Version < ActiveRecord::Base validate :validate_version scope :named, lambda {|arg| where("LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip)} - scope :open, where(:status => 'open') + scope :open, lambda { where(:status => 'open') } scope :visible, lambda {|*args| includes(:project).where(Project.allowed_to_condition(args.first || User.current, :view_issues)) } |