Sha256: 5692d6e99ce08015f54a6ac0a48dc8b8f82d453c98e3a5302949ccf1166d6339

Contents?: true

Size: 585 Bytes

Versions: 2

Compression:

Stored size: 585 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

2 entries across 2 versions & 1 rubygems

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