Sha256: 5799d338a6f42cd0d0778b4ce956b3a84bb30475b85b8fbe3d86ba0f6495cbad

Contents?: true

Size: 527 Bytes

Versions: 1

Compression:

Stored size: 527 Bytes

Contents

require "active_record"

class User < ActiveRecord::Base
	set_table_name :wp_users
	set_primary_key :ID
	
	has_many :settings
	has_many :pages, :foreign_key => :post_author
	has_many :posts, :foreign_key => :post_author
	has_many :comments, :foreign_key => :user_id
	
	def name
		display_name
	end
	
	def name= name
		self.display_name = name
	end
	
	def username
		user_login
	end
	
	def username= username
		self.user_login = username
	end
	
	def email
		user_email
	end
	
	def email= email
		self.user_email = email
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wpb-0.0.3 lib/wpb/user.rb