20 lines
728 B
Ruby
20 lines
728 B
Ruby
|
class UserExtensions < ActiveRecord::Base
|
||
|
attr_accessible :user_id,:birthday,:brief_introduction,:gender,:location,:occupation,:work_experience,:zip_code
|
||
|
#this method was used to update the table user_extensions
|
||
|
def update_user_extensions(birthday=nil,brief_introduction=nil,
|
||
|
gender=nil,location=nil,occupation=nil,work_experience=nil,zip_code=nil)
|
||
|
self.birthday = birthday
|
||
|
self.brief_introduction = brief_introduction
|
||
|
self.gender = gender
|
||
|
self.location = location
|
||
|
self.occupation = occupation
|
||
|
self.work_experience = work_experience
|
||
|
self.zip_code = zip_code
|
||
|
self.save
|
||
|
end
|
||
|
|
||
|
def get_brief_introduction
|
||
|
return self.brief_introduction
|
||
|
end
|
||
|
end
|