Reputation: 21
I want to move from rails 2 to 5 but link_to_remote
is not supported by Rails 5:
<%= link_to_remote "Add",
:url=>{:action=>'fee_submission',:batch=>@batch,s_id=>@stud_id}
In controller:
def fee_submission
# ..some code..
render :update do |page|
page.replace_html "fee", :partial => "fees"
end
View _fees.html.erb:
<html>
code
</html>
How can the above code be implemented in Rails 5?
Upvotes: 0
Views: 1214
Reputation: 6253
probably you can use remote: true in parameters option from link_to here is link for more detail
<%= link_to "Add", fee_submission_controller_path, remote: true %>
Upvotes: 1