status_id isn''t showing in the scaffolding because it is
''magic'':
http://wiki.rubyonrails.com/rails/pages/MagicFieldNames
The usual answer is to add it manually, since you will probably end up
customizing your view anyway, rather than leaving the scaffolding in
place.
e.g. <%= requirement.status_id %>
You can use the scaffold generator, rather than just putting the
''scaffold'' statement in your controller. That will give you
rhtml
files that you can edit, rather than needing to rebuild the thing from
scratch.
--Wilson.
On 9/29/05, Vamsee Kanakala <vamlists-hi6Y0CQ0nG0@public.gmane.org>
wrote:> Hi list,
>
> I''m sure I''m asking a very noobie question, but I
couldn''t find
> any hints about how to do this. I have a table named
''requirements''
> which has a status_id, which references id column of
''status'' table (set
> up the has_one and belongs_to respectively).
>
> However, the scaffold listing of requirements is not showing
> status or status_id. Is there a simple way I can show the status name in
> list.rhtml?
>
> Thanks,
> Vamsee.
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>