Sha256: 85622fc1f6f7819fd8785ea2b48db0d6fe24911e7a180a3cef81e39cc86415b8
Contents?: true
Size: 915 Bytes
Versions: 2
Compression:
Stored size: 915 Bytes
Contents
username = 'admin' email = 'admin@example.jp' password = 'adminpassword' # Don't edit! unless solr = Sunspot.commit rescue nil raise "Solr is not running." end Patron.reindex Library.reindex Shelf.reindex system_user = User.new system_user.username = 'system' system_user.password = SecureRandom.urlsafe_base64(32) system_user.email = system_user.email_confirmation = LibraryGroup.first.email system_user.save! system_user.role = Role.where(:name => 'Administrator').first system_user.index user = User.new user.username = username user.email = email user.email_confirmation = email user.password = password user.password_confirmation = password user.library = Library.real.first user.locale = I18n.default_locale.to_s user.user_number = '0' user.operator = user user.save! #user.confirm! user.role = Role.where(:name => 'Administrator').first user.index Sunspot.commit puts 'Administrator account created.'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
enju_leaf-1.1.0.beta3 | lib/generators/enju_leaf/setup/templates/db/seeds.rb |
enju_leaf-1.1.0.pre3 | lib/generators/enju_leaf/setup/templates/db/seeds.rb |