Forum: Ruby on Rails rescue value

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.
A6be7720d668f4f02160b600e67337e2?d=identicon&s=25 Ivan Medda (Guest)
on 2006-03-27 13:25
Do you know if exist a method to rescue the variable value pass to a
page .rhtml?

Something sucj as "_GET" in PHP?
Afcbb04db765e2506ab02d23850d55b8?d=identicon&s=25 Dominic Marks (Guest)
on 2006-03-27 13:36
(Received via mailing list)
Ivan Medda wrote:
> Do you know if exist a method to rescue the variable value pass to a
> page .rhtml?
>
> Something sucj as "_GET" in PHP?
>

Take the following Rails form URL:

   http://server/foo/bar/LikeThis

Where 'LikeThis' is the value variable.

And,

  <p><%= params[:id] -%></p>

.. is the content of a app/views/foo/bar.rhtml page.

If you visit that URL in your browser, the output HTML would be:

  <p>LikeThis</p>

I hope this is what you mean.
If it is you should buy the excellent Rails book (Agile Web Development
with Rails) to help you get started as this is probably the first thing
you would learn to do.

HTH,
Dominic
This topic is locked and can not be replied to.