configurable_engine 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -2,18 +2,21 @@
2
2
 
3
3
  <%= form_tag(admin_configurable_path, :method => :put) do -%>
4
4
  <%- Configurable.defaults.each do |key, options| -%>
5
- <%= label_tag key, options[:name] %>
6
- <%- if options[:type] == 'boolean' %>
7
- <%= check_box_tag key, "1", Configurable.send(key) %>
8
- <%- elsif options[:type] == 'password' -%>
9
- <%= password_field_tag key, Configurable.send(key) %>
10
- <%- elsif options[:type] == 'text' -%>
11
- <%= text_area_tag key, Configurable.send(key) %>
12
- <%- elsif options[:type] == 'list' -%>
13
- <%= text_area_tag key, Configurable.send(key).collect{ |a| a.join(",")}.join("\n") %>
14
- <%- else -%>
15
- <%= text_field_tag key, Configurable.send(key) %>
16
- <%- end -%>
5
+ <div class="configurable">
6
+ <%= label_tag key, options[:name] %>
7
+ <%- if options[:type] == 'boolean' %>
8
+ <%= hidden_field_tag key, "0", Configurable.send(key) %>
9
+ <%= check_box_tag key, "1", Configurable.send(key) %>
10
+ <%- elsif options[:type] == 'password' -%>
11
+ <%= password_field_tag key, Configurable.send(key) %>
12
+ <%- elsif options[:type] == 'text' -%>
13
+ <%= text_area_tag key, Configurable.send(key) %>
14
+ <%- elsif options[:type] == 'list' -%>
15
+ <%= text_area_tag key, Configurable.send(key).collect{ |a| a.join(",")}.join("\n") %>
16
+ <%- else -%>
17
+ <%= text_field_tag key, Configurable.send(key) %>
18
+ <%- end -%>
19
+ </div>
17
20
  <%- end -%>
18
21
 
19
22
  <%= submit_tag 'Save' %>
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{configurable_engine}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Campbell"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configurable_engine
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Campbell