Dev seed might now work
This commit is contained in:
parent
7076097ee4
commit
214685e5a9
2 changed files with 13 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ class User
|
|||
before_validation :do_bad_things
|
||||
|
||||
######## Posting ########
|
||||
|
||||
delegate :email, :email=, :to => :person
|
||||
|
||||
def method_missing(method, *args)
|
||||
self.person.send(method, *args)
|
||||
|
|
|
|||
|
|
@ -9,5 +9,16 @@
|
|||
require 'config/environment'
|
||||
|
||||
# Create seed user
|
||||
user = User.create( :email => "robert@joindiaspora.com", :password => "evankorth", :profile => Profile.new( :first_name => "bobert", :last_name => "brin" ))
|
||||
user = User.create( :password => "evankorth",
|
||||
:person => Person.create(
|
||||
:email => "robert@joindiaspora.com",
|
||||
:url => "http://localhost:3000/",
|
||||
:profile => Profile.new(
|
||||
:first_name => "bobert",
|
||||
:last_name => "brin" )))
|
||||
|
||||
puts user.save!
|
||||
puts user.person.save
|
||||
puts user.save!
|
||||
puts user.person.inspect
|
||||
puts user.inspect
|
||||
|
|
|
|||
Loading…
Reference in a new issue