<%- attributes.each do |a| -%> <%- next if @beautiful_attributes.include?(a.name + ':color') -%> <%- attribute = "" -%> <%- caption = a.name.capitalize -%> <%- if @beautiful_attributes.include?(a.name + ':references') then -%> <%- attribute = "_id" -%> <%- end -%> <%%= ransack_field("<%= singular_table_name %>", "<%= a.name %><%= attribute %>", f, "<%= caption %>") %> <%- end -%>