Probably a silly question, but I'm trying to create a partial that I
use in two seperate resources... one is called Tickets and one is
TicketsSearch.
I have links at the top of the page that order my seatrch by passing a
parameter into the ticket_path() variable...
Now I'd like to change that to the current path so that in
TicketsSearch I can use the same parameter and it would be like
saying
tickets_search_path( :order => date ) instead of ticket_path( :order
=> date ) w/o having to create an if statements and have two blocks of
table headers....
I hope that makes sense. Here's my table header view if it helps.
Ok I figured it out.... after trying 100 different things...
url_for() does the trick for me.
request.request_uri returns the entire path including current query
strings, which I don't want... nad I can't pass t new query strings,
but url_for allows you to pass it an action, controller and
query_strings, and if you leave the action or controller out, it uses
the current one, which is perfect now if I'm on the search, I get