Reputation: 157
I have a small question and don't have any idea how to deal with my problem.
I was looking for answer to question but I didn't find anything.
I want to refactor erb to haml.
My question is - how to refactor part of code like this (ruby code inside ruby code in one line):
<%%= render partial: '<%= singular_table_name %>', collection: @<%= plural_table_name %>, locals: {f: f} %>
http://html2haml.com answer is:
<%= render partial: '<%= singular_table_name %>', collection: @#{plural_table_name}, locals: {f: f} %>
But I don't think that's good idea...
Upvotes: 0
Views: 81
Reputation: 1652
= render partial: singular_table_name, collection: @plural_table_name, locals: {f: f}
Upvotes: 1