diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-24 16:32:39 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-24 16:32:39 +0000 |
commit | 44fcc8919d48a93f77bb0f671816c4c70811306e (patch) | |
tree | c267b72b238222b7ae6e9ff2bb265179a4a01f6a /app/models/version.rb | |
parent | 0b31c8ac85bab5d771fab65e88e2793765785d6f (diff) | |
download | redmine-44fcc8919d48a93f77bb0f671816c4c70811306e.tar.gz redmine-44fcc8919d48a93f77bb0f671816c4c70811306e.zip |
Adds Version.fields_for_order_statement.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10072 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index 600b9813a..bb0e7ec42 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -184,6 +184,11 @@ class Version < ActiveRecord::Base end end + def self.fields_for_order_statement(table=nil) + table ||= table_name + %w(effective_date name).map {|field| "#{table}.#{field}"} + end + # Returns the sharings that +user+ can set the version to def allowed_sharings(user = User.current) VERSION_SHARINGS.select do |s| |