I know i can pass a hash to a named_route, but how do i filter.

example

i have a bookings_controller and i want to filter the index lists
based on which link is clicked.

so something like
<%= link_to "Current Bookings", bookings_path(@current_bookings) %>

@current_bookings is set to Booking.current_bookings

and i have a named_scope
named_scope :current_bookings, :conditions => ['departure_date <= ?',
Date.today]

and i want to do something similar with archived_bookings and
canceled_bookings all using the same index view, but the data is
filtered based on the link that has been clicked

is this possible, and if so how?
--~--~---------~--~----~------------~-------~--~----~
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