Sha256: a637826eca85f3aebf43ebce9eeb1121500e6bb15c2ae93fdcec389bdd820172

Contents?: true

Size: 308 Bytes

Versions: 8

Compression:

Stored size: 308 Bytes

Contents

<% fields.each do |field| %>
  <% association = field.gsub(/_id/, "").to_sym %>
  <% reflection = f.object.class.reflect_on_association(association) %>
  <% if reflection && !reflection.options[:polymorphic] %>
    <%= f.association association %>
  <% else %>
    <%= f.input field %>
  <% end %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
outpost-cms-0.1.4 app/views/outpost/resource/_form_fields.html.erb
outpost-cms-0.1.3 app/views/outpost/resource/_form_fields.html.erb
outpost-cms-0.1.2 app/views/outpost/resource/_form_fields.html.erb
outpost-cms-0.1.1 app/views/outpost/resource/_form_fields.html.erb
outpost-cms-0.1.0 app/views/outpost/resource/_form_fields.html.erb
outpost-cms-0.0.5 app/views/outpost/resource/_form_fields.html.erb
outpost-cms-0.0.4 app/views/outpost/resource/_form_fields.html.erb
outpost-cms-0.0.3 app/views/outpost/resource/_form_fields.html.erb