<%- 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" -%> <%- elsif @beautiful_attributes.include?(a.name + ':richtext') then -%> <%- attribute = "_fulltext" -%> <%- end -%> <%%= ransack_field("<%= singular_table_name %>", "<%= a.name %><%= attribute %>", f, "<%= caption %>") %> <%- end -%> <%- { :created_at => "Created At", :updated_at => "Updated At", :id => "Id" }.each{ |k,v| -%> <%%= ransack_field("<%= singular_table_name %>", "<%= k.to_s %>", f, "<%= v %>") %> <%- } -%>