formula 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/formula.rb +13 -14
- metadata +3 -3
data/lib/formula.rb
CHANGED
|
@@ -83,7 +83,7 @@ module Formula
|
|
|
83
83
|
components << @template.content_tag(::Formula.hint_tag, options[:hint], :class => ::Formula.hint_class) if options[:hint]
|
|
84
84
|
components << @template.content_tag(::Formula.error_tag, options[:error], :class => ::Formula.error_class) if options[:error]
|
|
85
85
|
|
|
86
|
-
@template.content_tag(::Formula.block_tag, options[:container]) do
|
|
86
|
+
@template.content_tag(::Formula.block_tag, options[:container], :class => ::Formula.block_class) do
|
|
87
87
|
components
|
|
88
88
|
end
|
|
89
89
|
end
|
|
@@ -139,19 +139,18 @@ module Formula
|
|
|
139
139
|
self.block(method, options) do
|
|
140
140
|
@template.content_tag(::Formula.input_tag, :class => [::Formula.input_class, options[:as]]) do
|
|
141
141
|
case options[:as]
|
|
142
|
-
when :text then text_area
|
|
143
|
-
|
|
144
|
-
when :string then text_field
|
|
145
|
-
when :password then password_field
|
|
146
|
-
|
|
147
|
-
when :url then url_field
|
|
148
|
-
when :email then email_field
|
|
149
|
-
when :phone then phone_field
|
|
150
|
-
when :number then number_field
|
|
151
|
-
|
|
152
|
-
when :
|
|
153
|
-
when :
|
|
154
|
-
when :datetime then datetime_select(method, options[:input])
|
|
142
|
+
when :text then text_area method, options[:input]
|
|
143
|
+
when :file then file_field method, options[:input]
|
|
144
|
+
when :string then text_field method, options[:input]
|
|
145
|
+
when :password then password_field method, options[:input]
|
|
146
|
+
when :hidden then hidden_field method, options[:input]
|
|
147
|
+
when :url then url_field method, options[:input]
|
|
148
|
+
when :email then email_field method, options[:input]
|
|
149
|
+
when :phone then phone_field method, options[:input]
|
|
150
|
+
when :number then number_field method, options[:input]
|
|
151
|
+
when :date then date_select method, options[:input]
|
|
152
|
+
when :time then time_select method, options[:input]
|
|
153
|
+
when :datetime then datetime_select method, options[:input]
|
|
155
154
|
end
|
|
156
155
|
end
|
|
157
156
|
end
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 1
|
|
8
|
-
-
|
|
9
|
-
version: 0.1.
|
|
8
|
+
- 3
|
|
9
|
+
version: 0.1.3
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Kevin Sylvestre
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2010-
|
|
17
|
+
date: 2010-12-20 00:00:00 -05:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies: []
|
|
20
20
|
|