]> source.dussan.org Git - redmine.git/commitdiff
set_table_name and set_locking_column are deprecated.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 27 Apr 2012 16:28:35 +0000 (16:28 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 27 Apr 2012 16:28:35 +0000 (16:28 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9549 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/principal.rb
app/models/wiki_content.rb
lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
lib/plugins/open_id_authentication/lib/open_id_authentication/association.rb
lib/plugins/open_id_authentication/lib/open_id_authentication/nonce.rb

index f2bec0e2652871358c65533aaa8e53cfe0e31908..32e330aed2b925cad023970f46b711257ee8ae72 100644 (file)
@@ -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"
index 1787a7898bb4792d74cb162d5f4bfb271381b0e3..ac7459826921153b73a960ecf09993458f6acefa 100644 (file)
@@ -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
index 36442b2ad15ffbd514cb6bf6d44f19aa46eb674d..5ac65e35a4ddd07e45a607a6a16605da31d56c56 100644 (file)
@@ -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
index 9654eaeb2251bb1d832697cfcd8acb672df94a8e..8ab71bec02f064c7248035f368874db65dfbe85e 100644 (file)
@@ -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)
index c52f6c50dfcde5205bcaa41eb86b3698d1d96596..b28bf167928d5e6a9dcf97220498fd2728ebc4cc 100644 (file)
@@ -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