Topic: dependencies [SOLVED]

I have accounts and users
a user has to belong to a account

in my model i have

class User < ActiveRecord::Base
belongs_to :account

class Account < ActiveRecord::Base
has_many :users

but when i going to the console "rails c"

and i do User

how do i also get there account info?


Last edited by moiseszaragoza (2012-06-07 16:47:02)

Re: dependencies [SOLVED]

ok on the command line i got


on a view

<%=  %>

Last edited by moiseszaragoza (2012-06-07 16:38:22)