22 lines
703 B
Ruby
22 lines
703 B
Ruby
# coding: utf-8
|
|
# Default admin user (change password after first deploy to a server!)
|
|
if Administrator.count == 0 && !Rails.env.test?
|
|
admin = User.create!(username: "admin", email: "admin@consul.dev", password: "12345678",
|
|
password_confirmation: "12345678", confirmed_at: Time.current,
|
|
terms_of_service: "1")
|
|
admin.create_administrator
|
|
end
|
|
|
|
Setting.defaults.each do |name, value|
|
|
Setting[name] = value
|
|
end
|
|
|
|
WebSection.create(name: "homepage")
|
|
WebSection.create(name: "debates")
|
|
WebSection.create(name: "proposals")
|
|
WebSection.create(name: "budgets")
|
|
WebSection.create(name: "help_page")
|
|
|
|
# Default custom pages
|
|
load Rails.root.join("db", "pages.rb")
|