Re: retrieving value from @params

shaun
Mon, 21 Nov 2005 22:01:16 -0000

craig wrote:
> On 21 Nov 2005, at 21:39, shaun wrote:
>> @c =
@params[''CourseSection''][''section_name'']
>>
>> {"commit"=>"Submit",
"CourseSection"=>{"term"=>"fall",
>> "course_subject"=>"cs",
"section_number"=>"101",
>> "course_number"=>"153"}}
>>
>> Any idea what I could be doing wrong.
>
>
@params[''CourseSection''][''section_name''] is
nil. You should set this,
> perhaps by having a form field in the previous view: <%= text_field
> "CourseSection", "section_name" %>
>
> Yours,
> Craig
> --
> Craig Webster | t: +44 (0)131 516 8595 | e:
craig-07VhxHapISisTnJN9+BGXg@public.gmane.org
> Xeriom.NET    | f: +44 (0)709 287 1902 | w: http://xeriom.net

I don''t understand why
@params[''CourseSection''][''section_number'']
would
be nil.
CourseSection is a hash in a hash, so by asking for
@params[''CourseSection''][''section_name'']
should I not recieve the value
for section_number, being "153" in this case.