Sha256: 21c5ea51aa9324d2196da966d996079f62097b5ccdc4ae122263767db9314ffd
Contents?: true
Size: 1.04 KB
Versions: 19
Compression:
Stored size: 1.04 KB
Contents
<fieldset class="module aligned"> <% belongs_to_keys = @abstract_model.belongs_to_associations.map{|b| b[:child_key].first} %> <% properties.reject{|property| [:id, :created_at, :created_on, :deleted_at, :updated_at, :updated_on, :deleted_on].include?(property[:name]) || belongs_to_keys.include?(property[:name])}.each do |property| %> <% property_name = property[:name] %> <% property_type = property[:type] %> <% errors_exist = !(@object.errors[property_name].nil? || @object.errors[property_name].empty?) %> <div class="<%= errors_exist ? "form-row errors" : "form-row" %>"> <% if errors_exist %> <ul class="errorlist"> <% @object.errors[property_name].each do |error| %> <li><%= error %></li> <% end %> </ul> <% end %> <%= partial(property_type.to_s, :property => property) -%> </div> <% end %> </fieldset>
Version data entries
19 entries across 19 versions & 1 rubygems