Sha256: a19cb14eb428bf6adaa8ca2f8041547d9bcf8b1d6c5a24084e5b2421679d966c

Contents?: true

Size: 647 Bytes

Versions: 8

Compression:

Stored size: 647 Bytes

Contents

admin_nav_secondary = Menu.find_or_create_by_name(:name => "Admin Navigation: Secondary")

# Helper method for assigning roles to menu elements and subelements
def roles_to_list(role_array)
  role_array.map{ |r| r.id.to_s }.join(',')
end

MenuElement.find_or_create_by_display_name(
              :display_name => "Educational Institutions", 
              :menu => admin_nav_secondary, 
              :url => "/admin/schools",
              :view_role_list => roles_to_list([Role.course_admin, Role.scitent_admin]), 
              :edit_role_list => roles_to_list([Role.product_admin, Role.scitent_admin]), 
              :order_sequence => 102)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
scidea-schools-1.1 db/seeds.rb
scidea-schools-1.0.6 db/seeds.rb
scidea-schools-1.0.5 db/seeds.rb
scidea-schools-1.0.4 db/seeds.rb
scidea-schools-1.0.3 db/seeds.rb
scidea-schools-1.0.2 db/seeds.rb
scidea-schools-1.0.1 db/seeds.rb
scidea-schools-1.0.0 db/seeds.rb