Sha256: 13d4ef2f0edda293eba337d9a70b987aafa3dc258d8aba6863d412122484605e

Contents?: true

Size: 868 Bytes

Versions: 5

Compression:

Stored size: 868 Bytes

Contents

<h2>Config</h2>

<%= form_tag(admin_configurable_path, :method => :put) do -%>
  <%- @keys.each do |key| -%>
    <%- options = Configurable.defaults[key] -%>
    <div class="configurable">
      <%= label_tag key, options[:name] %>
      <%- if options[:type] == 'boolean' %>
        <%= hidden_field_tag key, "0" %>
        <%= 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.serialized_value(key) -%>
      <%- else -%>
        <%= text_field_tag key, Configurable.send(key) %>
      <%- end -%>
    </div>
  <%- end -%>
  
  <%= submit_tag 'Save' %>
<%- end -%>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
configurable_engine-0.4.8 app/views/admin/configurables/show.html.erb
configurable_engine-0.4.7 app/views/admin/configurables/show.html.erb
configurable_engine-0.4.6 app/views/admin/configurables/show.html.erb
configurable_engine-0.4.5 app/views/admin/configurables/show.html.erb
configurable_engine-0.4.4 app/views/admin/configurables/show.html.erb