Method: ActiveRecord::Base.set_column_names_for_vbulletin

Defined in:
lib/vbulletin_rails/core_ext.rb

+ (Object) set_column_names_for_vbulletin(options)

Method used in user processing model to overwrite default column names. Normally VBulletinRails assumes, that User model contains columns with names 'email', 'password' and (optional) 'username'. If you want to overwrite this, use this method as follows:

class User < ActiveRecord::Base
  set_column_names_for_vbulletin :email => :my_email_column_name, :password => :my_password_column_name, :username => :my_login_column_name
end


30
31
32
# File 'lib/vbulletin_rails/core_ext.rb', line 30

def self.set_column_names_for_vbulletin options
  @@vbulletin_column_names = {:email => :email, :password => :password, :username => :username}.merge(options.symbolize_keys)
end

Comments