Ruby on Rails Saturday, June 30, 2012

On Sat, Jun 30, 2012 at 10:36 AM, Felipe Pieretti Umpierre
<lists@ruby-forum.com> wrote:

> irb(main):001:0> Task.all

> => [#<Task id: 1, user_id: nil, project_id: 1, name:
> "W\r<br>T\r<br>F\r<br>VERY\r<br...", del
> eted: 0, done: 0, created_at: "2012-06-24 15:46:37", updated_at:
> "2012-06-30 17:13:27">, #<Task id: 2, user_id: nil, pro
> ject_id: 1, name: "Teste", deleted: 0, done: 0, created_at: "2012-06-30
> 17:11:27", updated_at: "2012-06-30 17:11:27">]
>
> I guess the project name should come too ? right ?

Wrong.

> What am I doing wrong ?

Misunderstanding ActiveRecord and associations :-)

Revisiting the relevant Rails guides might be a good idea.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.

No comments:

Post a Comment