Permalink
Browse files

change role migration to set name attribute directly as mass-assignme…

…nt protection in latest Rails causes migration to fail
  • Loading branch information...
1 parent be977ce commit c82fc36e2ea63ab655b3514000bd2531dc7c827a @robinjfisher robinjfisher committed May 10, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 db/migrate/002_create_roles.rb
@@ -15,7 +15,9 @@ def down
def create_roles
SimpleRoles::Configuration.valid_roles.each do |role|
- Role.create(:name => role.to_s)
+ r = Role.new
+ r.name = role.to_s
+ r.save
end
end
end

0 comments on commit c82fc36

Please sign in to comment.