summaryrefslogtreecommitdiffstats
path: root/app/models/principal.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-17 12:14:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-17 12:14:52 +0000
commit2c0ce104e7c0e56bf7ce4f0c2f71547c1d3b07fb (patch)
tree0f43bbb619e8f15302fad03643d9c3bcffe2475a /app/models/principal.rb
parente4e4b0f4b814a52e39e99185a0196d4398b720b4 (diff)
downloadredmine-2c0ce104e7c0e56bf7ce4f0c2f71547c1d3b07fb.tar.gz
redmine-2c0ce104e7c0e56bf7ce4f0c2f71547c1d3b07fb.zip
Fixed: Error on db:migrate with table prefix set (#5335).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3678 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/principal.rb')
-rw-r--r--app/models/principal.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb
index 8b46c7ff9..58c3f0497 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class Principal < ActiveRecord::Base
- set_table_name 'users'
+ set_table_name "#{table_name_prefix}users#{table_name_suffix}"
has_many :members, :foreign_key => 'user_id', :dependent => :destroy
has_many :memberships, :class_name => 'Member', :foreign_key => 'user_id', :include => [ :project, :roles ], :conditions => "#{Project.table_name}.status=#{Project::STATUS_ACTIVE}", :order => "#{Project.table_name}.name"