cirandas.net

ref: master

db/migrate/20131116165327_enable_enterprises_list_on_user_menu.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
class EnableEnterprisesListOnUserMenu < ActiveRecord::Migration
  def self.up
    # The enterprises were always listed on user menu.
    # As now it is configured by admin, the running environments should not need to enable it
    select_all("select id from environments").each do |environment|
      env = Environment.find(environment['id'])
      env.enable(:display_my_enterprises_on_user_menu)
    end
  end

  def self.down
    #nothing to be done
  end
end