1 2 3 4 5 6 7 8 9
class AddViewNewsToAllExistingRoles < ActiveRecord::Migration[4.2] def up Role.all.each { |role| role.add_permission! :view_news } end def down # nothing to revert end end