Skip to content

Instantly share code, notes, and snippets.

@jslag
Created June 23, 2011 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jslag/1043552 to your computer and use it in GitHub Desktop.
Save jslag/1043552 to your computer and use it in GitHub Desktop.
create an admin in refinerycms
Factory.define :role do |r|
end
Factory.define :user do |u|
u.username 'admin'
u.email 'admin@example.com'
u.password 'password'
u.password_confirmation 'password'
u.roles {|r| [ (r.association :role, :title => 'Refinery'),
(r.association :role, :title => 'Superuser')] }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment