# Database initial data ModelDiscovery::Engine.load_seed #Underworld::Workflows::Discovery.build_table_list Underworld::Discovery::Permissions.create_all_permissions case Underworld::ORM.current when 'active_record' admin_group = Underworld::Group.create(name: 'Admin', role: 'admin') guest_group = Underworld::Group.create(name: 'Guest', role: 'guest') admin_group.permissions = Underworld::Permission.all admin = Underworld::User.create(email: 'admin@example.com', password: 'changeme', password_confirmation: 'changeme') admin.groups << admin_group user = Underworld::User.create(email: 'user@example.com', password: '123123123', password_confirmation: '123123123') when 'mongoid' admin_group = Underworld::Group.create(name: 'Admin', role: 'admin') Underworld::Permission.each do |perm| admin_group.permissions << perm end admin_group.save! guest_group = Underworld::Group.create(name: 'Guest', role: 'guest') admin = Underworld::User.new(email: 'admin@example.com', password: 'changeme', password_confirmation: 'changeme') admin.groups << admin_group user = Underworld::User.new(email: 'user@example.com', password: '123123123', password_confirmation: '123123123') guest_group = Underworld::Group.new(name: 'Guest', role: 'guest') end admin.save user.save