<%= link_to 'NAME_OF_LINK ', URL_OF_LINK_path, class: "XXX", remote: true do %>
#here comes wrapping code
<% end %>
This gives error of Undefined method `stringify_keys' for " ": String,
Reason being :-
its not good practice to write NAME_OF_LINK, with link_to .. do block
Typically this is used when you want to have images or other tags as the contents of the link. It's purely for display purposes
here i have given few examples for ............
examples
1.
<%=link_to admin_update_tabs_path(id: admin.id), title: "ADMIN_UPDATE", id: "live", remote: true do%>
<%= content_tag :lable, 'ADMIN UPDATE' %>
<span>20</span>
<% end %>
2.
<%= link_to(edit_profile_path(id: user.id), title: "Edit") do %>
<img src="/assets/ico_edit_your_profile_edit.png" alt="Edit" />
<% end %>
Comments
Post a Comment