Sha256: c1e5fa9bdd478adf9226009024ca541096cd8ed9dbbbaef0bb17a335ff38327f

Contents?: true

Size: 761 Bytes

Versions: 3

Compression:

Stored size: 761 Bytes

Contents

<h2>Config</h2>

<%= form_tag(admin_configurable_path, :method => :put) do -%>
  <%- Configurable.defaults.each do |key, options| -%>
    <%= label_tag key, options[:name] %>
    <%- if options[:type] == 'boolean' %>
      <%= check_box_tag key, "1", Configurable.send(key) %>
    <%- elsif options[:type] == 'password' -%>
      <%= password_field_tag key, Configurable.send(key) %>
    <%- elsif options[:type] == 'text' -%>
      <%= text_area_tag key, Configurable.send(key) %>
    <%- elsif options[:type] == 'list' -%>
      <%= text_area_tag key, Configurable.send(key).collect{ |a| a.join(",")}.join("\n") %>
    <%- else -%>
      <%= text_field_tag key, Configurable.send(key) %>
    <%- end -%>
  <%- end -%>
  
  <%= submit_tag 'Save' %>
<%- end -%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
configurable_engine-0.2.3 app/views/admin/configurables/show.html.erb
configurable_engine-0.2.2 app/views/admin/configurables/show.html.erb
configurable_engine-0.2.1 app/views/admin/configurables/show.html.erb