--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It is no good just saying 'not working'. Post exactly what you have
tried and exactly what the result is.
By the way please don't top post, it makes it difficult to follow the
thread. Insert your replies inline at appropriate points in the
previous message. Thanks.
Colin
class User < ActiveRecord::Base
has_many :correlations
has_many :roles, :through => :correlations
has_many :skills, :through => :correlations
attr_accessible :email, :password, :password_confirmation, :remember_me, :role_ids, :skill_ids, :username, :first_name, :last_name, :address, :city, :state , :country, :phone_number, :photo,:fullname, :shortbio, :weburl
def role?(role)
return !!self.roles.find_by_name(role.to_s.camelize)
end
def skill?(skill)
return !!self.skills.find_by_name(skill.to_s.camelize)
end