The HTML generated by `erb` is like this:
<form method="post" action="/client_workouts/find"
<input type="hidden" value="✓" name="utf8">
<input type="text" name="search_string" id="search_string">
<input type="submit" value="Search" name="commit">
In the controller, it looks like this:
When I input some text in the text_field and click `Search`, the `find`
function can print out the value of that text.
This looks magic to me. Because in the `route`, the variable name is
`id`, but in the `controller`, this variable can be used by `params`. I
was wondering whether `id` is a magic variable that maps to `param`.
Does anyone have ideas about this. Thanks!
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.