|
|
|
@ -1,10 +1,5 @@ |
|
|
|
# This file should contain all the record creation needed to seed the database with its default values. |
|
|
|
# This file should contain all the record creation needed to seed the database with its default values. |
|
|
|
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). |
|
|
|
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). |
|
|
|
# |
|
|
|
|
|
|
|
# Examples: |
|
|
|
|
|
|
|
# |
|
|
|
|
|
|
|
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) |
|
|
|
|
|
|
|
# Character.create(name: 'Luke', movie: movies.first) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def find_or_create_user(organisation, email, name, role) |
|
|
|
def find_or_create_user(organisation, email, name, role) |
|
|
|
case role |
|
|
|
case role |
|
|
|
@ -53,6 +48,7 @@ unless Rails.env.test? |
|
|
|
other_stock_owners: "None", |
|
|
|
other_stock_owners: "None", |
|
|
|
managing_agents_label: "None", |
|
|
|
managing_agents_label: "None", |
|
|
|
provider_type: "LA", |
|
|
|
provider_type: "LA", |
|
|
|
|
|
|
|
housing_registration_number: nil, |
|
|
|
rent_periods: all_rent_periods, |
|
|
|
rent_periods: all_rent_periods, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|