summaryrefslogtreecommitdiffstats
path: root/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb
blob: 7c9896c982f2650634193ef66e398d79ebba1721 (plain)
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