link_to problem with ruby on rails

i have two link.

  1. <%= link_to “Add Transaction”, search_customer_path(@listing) %>

  2. <%= link_to “Loyalty Report”, search_customer_path(@listing) %>

These two links go to same pages. But when i click the <%= link_to “Loyalty Report”, search_customer_path(@listing) %>
. that the page should have another 3 links…? How is it possible…? Any way to pass any thing with that second link…?

Thank you

vishnu

You could add some URL parameters and check for them in the
controller, using that to pass a flag that says whether or not to show
the three extra links.

-Dave

These two links go to same pages. But when i click the <%= link_to
"Loyalty Report", search_customer_path(@listing) %> <br />. that the page
should have another 3 links.....? How is it possible..? Any way to pass any
thing with that second link....?

You could add some URL parameters and check for them in the
controller, using that to pass a flag that says whether or not to show
the three extra links.

In case you do not know how to do that you can use
<%= link_to "Loyalty Report", search_customer_path(@listing,
:my_param => "some_value") %>

Colin