Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ivaldi/brimir
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Groeneveld committed Feb 14, 2014
2 parents c853b72 + c19a9aa commit 088c090
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)

frank = User.new({ email: '[email protected]', password: 'testtest', password_confirmation: 'testtest' })
frank = User.where(email: '[email protected]').first_or_create({ email: '[email protected]', password: 'testtest', password_confirmation: 'testtest' })
frank.agent = true
frank.save!

sem = User.create({ email: '[email protected]', password: 'testtest', password_confirmation: 'testtest' })
sem = User.where(email: '[email protected]').first_or_create({ email: '[email protected]', password: 'testtest', password_confirmation: 'testtest' })
sem.agent = true
sem.save!

Status.create!({ name: 'Deleted' })
status_closed = Status.create!({ name: 'Closed' })
status_open = Status.create!({ name: 'Open', default: true })
Status.where(name: 'Deleted').first_or_create!({ name: 'Deleted' })
status_closed = Status.where(name: 'Closed').first_or_create!({ name: 'Closed' })
status_open = Status.where(name: 'Open').first_or_create!({ name: 'Open', default: true })

priority_none = Priority.create!({ name: 'None', default: true })
priority_low = Priority.create!({ name: 'Low' })
priority_medium = Priority.create!({ name: 'Medium' })
priority_high = Priority.create!({ name: 'High' })
priority_none = Priority.where(name: 'None').first_or_create!({ name: 'None', default: true })
priority_low = Priority.where(name: 'Low').first_or_create!({ name: 'Low' })
priority_medium = Priority.where(name: 'Medium').first_or_create!({ name: 'Medium' })
priority_high = Priority.where(name: 'High').first_or_create!({ name: 'High' })

password_length = 12
password = Devise.friendly_token.first(password_length)
owner = User.create!(email: '[email protected]', password: password, password_confirmation: password)
owner = User.where(email: '[email protected]').first_or_create!({ email: '[email protected]', password: password, password_confirmation: password })

Ticket.create!([
{
Expand Down

0 comments on commit 088c090

Please sign in to comment.