Merge pull request #655 from sgmap/remove-seeds
[Ref #288] Remove the seeds.rb file which required an uncommitted file
This commit is contained in:
commit
116398d9d8
4 changed files with 12 additions and 17 deletions
11
README.md
11
README.md
|
@ -48,6 +48,17 @@ Afin de générer la BDD de l'application, il est nécessaire d'éxécuter les c
|
|||
rake db:migrate RAILS_ENV=test
|
||||
|
||||
|
||||
## Création des comptes initiaux
|
||||
|
||||
rails c
|
||||
> email = "<votre email>"
|
||||
> password = "<votre mot de passe>"
|
||||
> Administration.create(email: email, password: password)
|
||||
> Administrateur.create(email: email, password: password)
|
||||
> Gestionnaire.create(email: email, password: password)
|
||||
> User.create(email: email, password: password)
|
||||
|
||||
|
||||
## Lancement de l'application
|
||||
|
||||
redis-server
|
||||
|
|
|
@ -384,9 +384,9 @@ ActiveRecord::Schema.define(version: 20170713151123) do
|
|||
t.boolean "individual_with_siret", default: false
|
||||
t.date "auto_archive_on"
|
||||
t.datetime "hidden_at"
|
||||
t.index ["hidden_at"], name: "index_procedures_on_hidden_at", using: :btree
|
||||
t.datetime "published_at"
|
||||
t.datetime "archived_at"
|
||||
t.index ["hidden_at"], name: "index_procedures_on_hidden_at", using: :btree
|
||||
end
|
||||
|
||||
create_table "quartier_prioritaires", force: :cascade do |t|
|
||||
|
|
|
@ -5,12 +5,3 @@
|
|||
#
|
||||
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
||||
# Mayor.create(name: 'Emanuel', city: cities.first)
|
||||
|
||||
Dir[File.join(Rails.root, 'db', 'seeds', '*.rb')].sort.each { |seed| load seed }
|
||||
|
||||
# puts "create links"
|
||||
# TypePieceJointe.find_each do |type_piece_jointe|
|
||||
# forms = Formulaire.find_by_demarche_id(type_piece_jointe.CERFA)
|
||||
# type_piece_jointe.update_attributes(formulaire_id: forms.id) unless forms.nil?
|
||||
# end
|
||||
# puts "end links creation"
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
begin
|
||||
Administration.create!(email: SUPERADMIN.email, password: SUPERADMIN.password)
|
||||
rescue ActiveRecord::RecordInvalid
|
||||
admin = Administration.find_by_email(SUPERADMIN.email)
|
||||
admin.password = SUPERADMIN.password
|
||||
admin.save
|
||||
end
|
Loading…
Reference in a new issue