Reputation: 10350
I would like to pass a rails route as parameter to controller as variable, so the Back button knows where to back. Tried to include :previous_page => route_path as parameter for link_to. However it caused an error in index page display.
def edit_cust?(cust, previous_page)
return link_to 'Edit', edit_customer_path(cust, :previous_page => previous_page) if has_edit_right?(cust)
end
Any suggestions? Thanks.
Upvotes: 0
Views: 281