How would you go about producing reports by user selected date ranges in a rails app? What are the best date range pickers?
edit in response to patrick : I am look
It's not an unRESTful practice to have URL parameters control the range of selected records. In your index action, you can do what Patrick suggested and have this:
#initialize start_date and end_date up here, by pulling from params probably
@models = SomeModel.find(:all, :conditions => ['date >= ? and date <= ?', params[:start_date], params[:end_date]])
Then in your index view, create a form that tacks on ?start_date=2008-01-01&end_date=2008-12-31 to the URL. Remember that it's user-supplied input, so be careful with it. If you put it back on the screen in your index action, be sure to do it like this:
Showing records starting on
<%= h start_date %>
and ending on
<%= h end_date %>