Hi,
I have implemented the scaffold crud for users table.
My page is having show, edit, delete link and date-wise search option.
I have to pass the date in links as a paramater when i clicked the
search button.
So i added the date as parameter in all available links such as show,
edit, delete, back and redirect_to as like
<%= link_to ‘Show’, user_path(user, :date=>params[:date] %>
My questions are,
-
Any other common method to pass the parameter to links or redirect_to
? -
How to pass the parameter(eg :date=>params[:date] in following
form_for tag and redirect_to tag
a) <% form_for([:user,@log]) do |f| %>
b) redirect_to(user_logs_url)