if you are using role_requirement, here's how to set the role:
@user = User.find(3)
@user.role_ids = ["1"]
your roles_users table should have a record with id = 1 and the name of the role (name = "member").
take note that its an array, so a user could have multiple roles, such as, @user.role_ids = ["1", "3"].
if you are using RESTful Authentication with role_requirement, you can evaluate by:
if @user.has_role?("member")
has_role does not add any record, it just evaluates the role in question:
def has_role?(role_in_question)
@_list ||= self.roles.collect(&:name)
# return true if @_list.include?("admin")
(@_list.include?(role_in_question.to_s) )
end
Please paste more of your code so we can check it out.
Hope that helps?!