Displaying 2 results from an estimated 2 matches for "a_case".
Did you mean:
as_case
2006 Jan 27
1
Basic Many-to-One association
...ases (Many) as detail records!!!)
We probably should add "has_many :cases" to the case_status model as
well. I did not need that for the below to work, but it is part of
what is describe on page 234.
3) I edited the app/view/case/list.rhtml file to replace
<%=h CaseStatus.find(a_case.status_id).status %>
with
<%=h a_case.case_status.status %>
Now that this is done, you should be able to use
"a_case.case_status.active" as well in the controller.
Hope that helps
Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
2005 Dec 22
4
Is "case" a magic name
I''m a newbie.
My first app is using a table called cases. With just "scaffold
:case" I get the basic list to show up.
I just did a "generate scaffold case case" (I think that is correct).
Now when I try to list my cases, I''m getting a syntax error on all of
the view source code that references "case".
ie. <% for case in @cases %>
Thanks