Sha256: fa8f49c468b94c5ad142a2e865d3249676390daf62648ab15e68a2b148846610
Contents?: true
Size: 957 Bytes
Versions: 68
Compression:
Stored size: 957 Bytes
Contents
# 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 rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Mayor.create(:name => 'Daley', :city => cities.first) # Change the following username = 'admin' email = 'admin@example.jp' password = 'adminpassword' # Don't edit! require 'active_record/fixtures' unless solr = Sunspot.commit rescue nil raise "Solr is not running." end Dir.glob(Rails.root.to_s + '/db/fixtures/*.yml').each do |file| ActiveRecord::Fixtures.create_fixtures('spec/dummy/db/fixtures', File.basename(file, '.*')) end user = User.new user.username = username user.email = email user.password = password user.password_confirmation = password user.role = Role.find_by_name('Administrator') user.save! puts 'Administrator account created.'
Version data entries
68 entries across 68 versions & 2 rubygems