On 22 February 2010 13:36, Heinz Strunk <[email protected]> wrote:
> Hello
>
> is there any way to pass paramters in a more proper way than I do
> currently? Since it's the easiest way I'm just passing them as GET
> parameters at the moment for example:
> http://localhost:3000/actions/980190963/add_date?t=2010-02-23
> http://localhost:3000/actions/new?at=678542324&t=851829735&tt=Type1
>
> I really don't like that way of passing parameters and doesn't look very
> rails-like.
>
> So solution I can think of so far is to turn all of these links into
> forms with hidden tags but I don't really like that either even though I
> think it's better than now.

I don't understand what you mean.  Even if you use hidden fields the
url will still look as in your examples.  Or are you actually talking
about what the code in your view looks like.  If so then, for example,
you can just add the parameters in link_to, so for example:
link_to 'Some Text', :controller => 'some_controller', :action =>
'some_action', :t => '2010-02-23', tt => 'Type1'

Colin

-- 
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 protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to