Sha256: c5190f18b254c5d1f0601b759587e0fe83aaec3d1e3ea8e54760d0159459daee

Contents?: true

Size: 586 Bytes

Versions: 1

Compression:

Stored size: 586 Bytes

Contents

<%%= f.inputs do %>
<%- attributes.each do |attribute| -%>
    <%- case attribute.type
        when :references, :belongs_to  -%>
    <%% if @<%= singular_table_name %>.new_record? -%>
        <%%= f.input :<%= attribute.name %> if can?(:manage, <%=class_name %>) %>
    <%% else -%>
        <%%= f.input :<%= attribute.name %> %>
    <%% end -%>
    <%-	when :date -%>
    <%%= f.input :<%= attribute.name %>, :as => :string, :input_html => { :class => 'calendar', :maxlength => 10 } %>
    <%-	else -%>
    <%%= f.input :<%= attribute.name %> %>
    <%- end -%>
<%- end -%>
<%% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
leonardo-1.9.0.beta1 lib/generators/erb/leosca/templates/formtastic/_fields.html.erb