Sha256: eb1e52b1b92ae713fa4d65c7681d3f59a15aaac59525e8ac2db69c36b6819157
Contents?: true
Size: 1.11 KB
Versions: 9
Compression:
Stored size: 1.11 KB
Contents
<%= form_for resource_instance_variable, :url => resource_path(resource_instance_variable), :remote => true do |f| %> <div id="errors"> <ul> <% resource_instance_variable.errors.full_messages.each do |error| %> <li><%= error %></li> <% end %> </ul> </div> <table> <% resource_handler.attributes.each do |attribute| %> <tr> <% 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 %> <% begin %> <%= render attribute[:type].to_s, attribute: attribute, f: f %> <% rescue ActionView::MissingTemplate %> <%= render 'string', attribute: attribute, f: f %> <% end %> <% end %> </tr> <% end %> <tr> <td class="submit" colspan="2"> <%= f.button _t('save'), :class => 'button' %> </td> </tr> </table> <% end %>
Version data entries
9 entries across 9 versions & 1 rubygems