Method: ActiveRecord::Base.include_vbulletin

Defined in:
lib/vbulletin_rails/core_ext.rb

.include_vbulletinObject

Method used in user processing model to include vbulletin support

class User < ActiveRecord::Base
  include_vbulletin
end

With this method included, two hooks on User are added:

  • When user is created - additional VBulletin account corresponding to user email and password is created, see: add_vbulletin

  • When user is updated - corresponding VBulletin password is updated, see: update_vbulletin

  • When user is validated - corresponding VBulletin object is validated as well, see: validate_vbulletin



16
17
18
19
20
# File 'lib/vbulletin_rails/core_ext.rb', line 16

def self.include_vbulletin
  before_validation :validate_vbulletin
  before_create :add_vbulletin
  after_update :update_vbulletin
end

Comments