hey everyone, i'm trying to break down 2:12 and try to understand from the solution and instructions provided because i couldn't solve it myself, even if i copy the ready solution, the results are not the same as the example...
the example says:
lissa = User.new 'QTSort'
lissa.username # => "QTSort"
lissa.blogs # => []
lissa.add_blog Date.parse("2010-05-28") , "Sailor Mars is my favourite"
lissa.blogs # => [ blog1 ]
Blog.new Date.parse("2007-01-02"), lissa, "Going dancing!" # we'll call this blog2
Blog.new Date.parse("2006-01-02"), lissa, "For the last time, fuck facebook >.<" # we'll call this blog3
Blog.new Date.parse("2010-01-02"), lissa, "Got a new job, cuz I'm pretty much the best ^_^" # we'll call this blog4
when I did it on my computer with the solution provided, the last lissa.blogs call still shows 1 blog,
I can't see how
Blog.new Date.parse("2007-01-02"), lissa, "Going dancing!"
will save the newly created blog in the User class under blogs array. Hope you understand...
hey everyone, i'm trying to break down 2:12 and try to understand from the solution and instructions provided because i couldn't solve it myself, even if i copy the ready solution, the results are not the same as the example... the example says:
lissa = User.new 'QTSort'
lissa.username # => "QTSort"
lissa.blogs # => []
lissa.add_blog Date.parse("2010-05-28") , "Sailor Mars is my favourite"
lissa.blogs # => [ blog1 ]
Blog.new Date.parse("2007-01-02"), lissa, "Going dancing!" # we'll call this blog2
Blog.new Date.parse("2006-01-02"), lissa, "For the last time, fuck facebook >.<" # we'll call this blog3
Blog.new Date.parse("2010-01-02"), lissa, "Got a new job, cuz I'm pretty much the best ^_^" # we'll call this blog4
lissa.blogs # => [ blog1 , blog4 , blog2 , blog3 ]
when I did it on my computer with the solution provided, the last lissa.blogs call still shows 1 blog, I can't see how Blog.new Date.parse("2007-01-02"), lissa, "Going dancing!" will save the newly created blog in the User class under blogs array. Hope you understand...