Skip to content

Commit

Permalink
change role migration to set name attribute directly as mass-assignme…
Browse files Browse the repository at this point in the history
…nt protection in latest Rails causes migration to fail
  • Loading branch information
robinjfisher committed May 10, 2012
1 parent be977ce commit c82fc36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/migrate/002_create_roles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c82fc36

Please sign in to comment.