Forum: Ruby on Rails Creating your own params

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mohammad (Guest)
on 2006-04-29 06:47
I want to pass my own param called randid so I can do this
@rnd = params[:randid]
this will work if I can pass the :randid
Wilson B. (Guest)
on 2006-04-29 06:53
(Received via mailing list)
On 4/28/06, Mohammad <removed_email_address@domain.invalid> wrote:
> I want to pass my own param called randid so I can do this
> @rnd = params[:randid]
> this will work if I can pass the :randid
>

Just make a form input field with the name 'randid', and you're good.
If you want to do it via a GET, you can pass it in the URI and define
the name 'randid' for it in routes.rb
Kevin O. (Guest)
on 2006-04-29 07:11
(Received via mailing list)
You can also do it like this...

link_to 'action', :action=>'action', :randid=>randid

On Friday, April 28, 2006, at 10:51 PM, Wilson B. wrote:
>Rails mailing list
>removed_email_address@domain.invalid
>http://lists.rubyonrails.org/mailman/listinfo/rails


_Kevin
This topic is locked and can not be replied to.