Forum: Ruby on Rails @params Hash Access

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Eric W. (Guest)
on 2006-01-25 21:53
(Received via mailing list)
I am trying to load an ActiveRecord object from an ID within a hidden
field in a submitted form. How do I do it?

I get this into the controller with the request:

   Parameters: {"action"=>"index", "website"=>{"id"=>"7"},

So, how do I load the Website object from ID 7?

     @website =[:website])

That fails, and this is a crappy way to do it anyway.


fails as well. How do I get to that ID?


Eric W.
Email: removed_email_address@domain.invalid
Ezra Z. (Guest)
on 2006-01-25 21:59
(Received via mailing list)
On Jan 25, 2006, at 11:49 AM, Eric W. wrote:

> Eric W.
> Email: removed_email_address@domain.invalid
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid


You were almost there ;)

-Ezra Z.
Yakima Herald-Republic
This topic is locked and can not be replied to.