Sha256: cc8ed6748fab2b52a135527e5f702a71868e12f3865a4400cca66cfe7ec1f532

Contents?: true

Size: 753 Bytes

Versions: 7

Compression:

Stored size: 753 Bytes

Contents

              <div class="form-row page">
                <div>
                  <% if property.type.respond_to?(:flag_map) #Enum or Flag type %>
                  <%= select(property.name, :collection => property.type.flag_map.map{|x| [x[1], x[1].to_s.capitalize.gsub('_', ' ')]}.sort{|a, b| a[1] <=> b[1]}, :label => property.field.capitalize.gsub('_', ' ')) %>
                  <% else %>
                  <%= text_field(property.name, :maxlength => property.length, :label => property.field.capitalize.gsub('_', ' ')) %>
                  <% end %>
                  <p class="help">
                    <%= !property.nullable? || property.serial? ? "Required." : "Optional." %>
                  </p>
                </div>
              </div>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sferik-merb-admin-0.1.7 app/views/forms/_integer.html.erb
sferik-merb-admin-0.1.8 app/views/forms/_integer.html.erb
sferik-merb-admin-0.1.9 app/views/forms/_integer.html.erb
sferik-merb-admin-0.2.0 app/views/forms/_integer.html.erb
sferik-merb-admin-0.2.1 app/views/forms/_integer.html.erb
sferik-merb-admin-0.2.2 app/views/forms/_integer.html.erb
sferik-merb-admin-0.2.3 app/views/forms/_integer.html.erb