you can always add extra parameter in link_to
or link_to_remote .. every method will allow you to send extra
parameter
to the controller in all cases whether you are using restful routing
or not
for example:
link_to "a" ,{:controller=>:your_controller, :method
=> :your_method , :flag=>"a"}
or
link_to "a" , you_controller_path(:flag=>"a")
On Jul 21, 10:24 am, Rails List <[email protected]>
wrote:
> Let us say, I have a page with couple of links and i would like to send
> unique flag/variable settings through params for each these links when
> they are clicked.
>
> For example:
>
> A link clicked - flag 'a' sent
> B link clicked - flag 'b' sent
>
> The exact scenario is that when the link is clicked, I have to perform a
> "find" to see if the params value exists in table 1 or 2 or 3...so on.
>
> This is a very bad design and it is costly in terms of performance.
>
> If I can set a flag/variable/indicator with each link, then I can
> straight away perform "find" in its corresponding table and execute the
> query.
>
> Any pointers are more appreciated.
> --
> Posted viahttp://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 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
-~----------~----~----~----~------~----~------~--~---