summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-27 16:28:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-27 16:28:35 +0000
commitd940797aa79f9c12df154422768096f77285e378 (patch)
treef225a040f9d8584f5063b36fa85bfcf84962e8a1
parentd2f779d6e8cd8ffd42f0f2826e84876f2a19f916 (diff)
downloadredmine-d940797aa79f9c12df154422768096f77285e378.tar.gz
redmine-d940797aa79f9c12df154422768096f77285e378.zip
set_table_name and set_locking_column are deprecated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9549 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/principal.rb2
-rw-r--r--app/models/wiki_content.rb2
-rw-r--r--lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb2
-rw-r--r--lib/plugins/open_id_authentication/lib/open_id_authentication/association.rb2
-rw-r--r--lib/plugins/open_id_authentication/lib/open_id_authentication/nonce.rb2
5 files changed, 5 insertions, 5 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb
index f2bec0e26..32e330aed 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 "#{table_name_prefix}users#{table_name_suffix}"
+ self.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"
diff --git a/app/models/wiki_content.rb b/app/models/wiki_content.rb
index 1787a7898..ac7459826 100644
--- a/app/models/wiki_content.rb
+++ b/app/models/wiki_content.rb
@@ -18,7 +18,7 @@
require 'zlib'
class WikiContent < ActiveRecord::Base
- set_locking_column :version
+ self.locking_column = 'version'
belongs_to :page, :class_name => 'WikiPage', :foreign_key => 'page_id'
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
validates_presence_of :text
diff --git a/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb b/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
index 36442b2ad..5ac65e35a 100644
--- a/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
+++ b/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
@@ -273,7 +273,7 @@ module ActiveRecord #:nodoc:
versioned_class.cattr_accessor :original_class
versioned_class.original_class = self
- versioned_class.set_table_name versioned_table_name
+ versioned_class.table_name = versioned_table_name
versioned_class.belongs_to self.to_s.demodulize.underscore.to_sym,
:class_name => "::#{self.to_s}",
:foreign_key => versioned_foreign_key
diff --git a/lib/plugins/open_id_authentication/lib/open_id_authentication/association.rb b/lib/plugins/open_id_authentication/lib/open_id_authentication/association.rb
index 9654eaeb2..8ab71bec0 100644
--- a/lib/plugins/open_id_authentication/lib/open_id_authentication/association.rb
+++ b/lib/plugins/open_id_authentication/lib/open_id_authentication/association.rb
@@ -1,6 +1,6 @@
module OpenIdAuthentication
class Association < ActiveRecord::Base
- set_table_name :open_id_authentication_associations
+ self.table_name = :open_id_authentication_associations
def from_record
OpenID::Association.new(handle, secret, issued, lifetime, assoc_type)
diff --git a/lib/plugins/open_id_authentication/lib/open_id_authentication/nonce.rb b/lib/plugins/open_id_authentication/lib/open_id_authentication/nonce.rb
index c52f6c50d..b28bf1679 100644
--- a/lib/plugins/open_id_authentication/lib/open_id_authentication/nonce.rb
+++ b/lib/plugins/open_id_authentication/lib/open_id_authentication/nonce.rb
@@ -1,5 +1,5 @@
module OpenIdAuthentication
class Nonce < ActiveRecord::Base
- set_table_name :open_id_authentication_nonces
+ self.table_name = :open_id_authentication_nonces
end
end