Sha256: 33b89c818f20831f8a89ef529f4417e675761b7f4f7e77513530be100ce6d407
Contents?: true
Size: 1.29 KB
Versions: 12
Compression:
Stored size: 1.29 KB
Contents
<%= form_for resource_instance_variable, :url => resource_path(resource_instance_variable), :remote => true do |f| %> <div id="errors" style="display: none"></div> <table> <%- resource_handler.attributes.each do |attribute| -%> <tr> <%- if attribute[:type] == :boolean -%> <td></td> <td class="checkbox"> <%= f.send :check_box, attribute[:name] -%> <%= f.send :label, attribute[:name] %> </td> <%- elsif attribute[:type] == :text -%> <td class="input"><%= f.send :text_area, attribute[:name] -%></td> <%- else -%> <td class="label"><%= f.send :label, attribute[:name] %></td> <% attr_array = attribute[:name].split('.') %> <% if attr_array.length > 1 %> <td class="select"> <%= f.send :select, "#{attr_array[0]}_id", attr_array[0].classify.constantize.all.collect {|r| [r.send(attr_array[1]), r.id] }, {:prompt => t("Please choose")}, {:class => "alchemy_selectbox"} %> </td> <% else %> <td class="input"> <%= f.send :text_field, attribute[:name], :class => 'thin_border' -%> </td> <% end %> <%- end -%> </tr> <%- end -%> <tr> <td class="submit" colspan="2"> <%= f.button t('save'), :class => 'button' %> </td> </tr> </table> <% end %>
Version data entries
12 entries across 12 versions & 1 rubygems