# 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"
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
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
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)
module OpenIdAuthentication
class Nonce < ActiveRecord::Base
- set_table_name :open_id_authentication_nonces
+ self.table_name = :open_id_authentication_nonces
end
end