[Rails] Re: Help With Dependent Drop-Down and @Params
Brian Hughes '89
brianvh at Alum.Dartmouth.ORG
Sun Apr 9 16:25:46 GMT 2006
OK. This is a case where you need to have a view for this controller,
and in the view you place:
<pre><%= params.debug %></pre>
That will show you the makeup of the params object, so that you can
figure out how you need to reference the object in the hash.
If the HTML being produced shows a form field with name="deal
[utility]", that tells Rails to create a :deal hash, within the
params hash, with one entry using :utility as it's key. Referencing
params[:deal][:utility] should return the value of that entry...
-Brian
On Apr 9, 2006, at 11:54 AM, David Hughes wrote:
> The Barge wrote:
>> @params["deal"]["utility"] maybe? I do the same thing with a
>> select but
>> don't have my code handy right now.
>>
>
> Barge...tried that to...nada. Thanks for the suggestion. It is weird.
More information about the Rails
mailing list