Sha256: 5db530020bd7b6cb9039dd492f719eebaca900504c4ae766f351bb8916e187f4
Contents?: true
Size: 834 Bytes
Versions: 6
Compression:
Stored size: 834 Bytes
Contents
# encoding: utf-8 def insert_user User.delete_all password = Rails.env.production? ? Devise.friendly_token : (1..9).to_a.join admin = User.new do |u| u.name = "Administrator" u.email = 'dev@fodojo.com' u.password = password u.password_confirmation = password u.login = 'admin' if u.respond_to?(:login) u.role_type = RoleType.admin end admin.skip_confirmation! admin.save! puts "Admin: #{admin.email}, #{admin.password}" end def insert_structures Structure.delete_all main_page = Structure.create!(title: "Главная страница", slug: "main-page", structure_type: StructureType.main, parent: nil) # Structure.create!(title: "Трансляции", slug: "broadcasts", structure_type: StructureType.broadcasts, parent: main_page) end insert_user insert_structures
Version data entries
6 entries across 6 versions & 1 rubygems