formula 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/formula.rb +11 -11
  2. metadata +3 -3
data/lib/formula.rb CHANGED
@@ -79,7 +79,7 @@ module Formula
79
79
 
80
80
  components << self.label(method, options[:label])
81
81
 
82
- components << @template.capture(&block)
82
+ components << @template.content_tag(::Formula.input_tag, @template.capture(&block), :class => ::Formula.input_class)
83
83
 
84
84
  components << @template.content_tag(::Formula.hint_tag, options[:hint], :class => ::Formula.hint_class) if options[:hint]
85
85
  components << @template.content_tag(::Formula.error_tag, options[:error], :class => ::Formula.error_class) if options[:error]
@@ -142,19 +142,19 @@ module Formula
142
142
 
143
143
  self.block(method, options) do
144
144
  case options[:as]
145
- when :text then text_area(method)
145
+ when :text then text_area(method, options[:input] || {})
146
146
 
147
- when :string then text_field(method)
148
- when :password then password_field(method)
147
+ when :string then text_field(method, options[:input] || {})
148
+ when :password then password_field(method, options[:input] || {})
149
149
 
150
- when :url then url_field(method)
151
- when :email then email_field(method)
152
- when :phone then phone_field(method)
153
- when :number then number_field(method)
150
+ when :url then url_field(method, options[:input] || {})
151
+ when :email then email_field(method, options[:input] || {})
152
+ when :phone then phone_field(method, options[:input] || {})
153
+ when :number then number_field(method, options[:input] || {})
154
154
 
155
- when :date then date_select(method)
156
- when :time then time_select(method)
157
- when :datetime then datetime_select(method)
155
+ when :date then date_select(method, options[:input] || {})
156
+ when :time then time_select(method, options[:input] || {})
157
+ when :datetime then datetime_select(method, options[:input] || {})
158
158
  end
159
159
  end
160
160
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 6
9
- version: 0.0.6
8
+ - 7
9
+ version: 0.0.7
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-11-10 00:00:00 -05:00
17
+ date: 2010-11-11 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies: []
20
20