Sha256: 3d441d2c9c7855997cb3a867d1dfe4aa3b1e5b122ed713f0871f91211b95d682
Contents?: true
Size: 641 Bytes
Versions: 7
Compression:
Stored size: 641 Bytes
Contents
# encoding: utf-8 def insert_user User.truncate! password = Rails.env.production? ? Devise.friendly_token : (1..8).to_a.join admin = User.new do |u| u.email = 'test@test.com' u.password = password u.password_confirmation = password u.user_role_id = UserRoleType.admin.id end admin.activate! admin.save! puts "Admin: #{admin.email}, #{admin.password}" end def insert_structures Structure.truncate! main_page = Structure.create!({:title => 'Главная страница', :slug => 'main-page', :structure_type => StructureType.main, :parent => nil}, :as => :admin) end insert_user insert_structures
Version data entries
7 entries across 7 versions & 1 rubygems