search for: moderator_rol

Displaying 2 results from an estimated 2 matches for "moderator_rol".

Did you mean: moderator_role
2010 May 08
2
uninitialized constant - Please Help Me...
...ow people to discuss things etc... I am following a tutorial in the book: APRESS - Practical Rails Social Networking Sites and have hit a minor issue. Part of the Forum requirements is to add a moderator role to allow only certain individuals the ability to manage topics etc. That code is in the moderator_role.rb migration file which looks like this: class AddModeratorRole < ActiveRecord::Migration def self.up moderator_role = Role.create(:name => ''Moderator'') admin_user = User.find_by_username(''Admin'') admin_user.roles << moderator_role e...
2010 Sep 25
3
Factory_girl association with specific values
Hope this should be simple: I have a User model and a Role model. Factories for each. When I create a User using FG, I want to assign a specific role. Cant seem to figure out how to do this, getting errors like: uninitialized constant SysadminRole for doing things this way: Factory.define :user do |u| u.practice_id { |a| a.association(:practice).id } u.password ''password1''