summaryrefslogtreecommitdiffstats
path: root/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb
blob: 1722eb316fe4547e60fc121759fe6e5cc6946df8 (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: false

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