In my project I have a link that when clicked runs a report. The report receives a date_min and date_max from 2 jQuery datepickers. Currently javascript is used to get the values of date_min and date_max which is then used in a URL so in the controller I can access the values in params.
view:
<li><a href="javascript:" onclick="get_report_values()">Report</a></li>
Coffeescript:
@get_report_values = ->
window.open("/reports/test_report?date_min=" + $('#datepicker_min').val() + "&date_max=" + $('#datepicker_max').val(), "_blank")
Using javascript to set the values for the controller to get seems like an extra step. Is there a Rails best practice that would allow me to skip this step? I do not have the datepickers in a form so I can not use POST. I don't feel the data needs to persist between requests so I don't feel sessions are suitable.
Any advice would be appreciated.
Thanks