merb_form_fields 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'merb-core'
5
5
  require 'merb-core/tasks/merb'
6
6
 
7
7
  GEM_NAME = "merb_form_fields"
8
- GEM_VERSION = "0.0.4"
8
+ GEM_VERSION = "0.0.5"
9
9
  AUTHOR = "Jacques Crocker"
10
10
  EMAIL = "merbjedi@gmail.com"
11
11
  HOMEPAGE = "http://github.com/merbjedi/merb_form_fields"
@@ -54,7 +54,7 @@ module MerbFormFields
54
54
  error_override = attrs.delete(:error)
55
55
 
56
56
  # build inner field html (using the passed in block)
57
- inner_html = yield if block_given?
57
+ inner_html = yield(attrs) if block_given?
58
58
 
59
59
  # skip certain field types
60
60
  # :fields => {:force => true} will force the field to show
@@ -121,8 +121,8 @@ module MerbFormFields
121
121
  self.class_eval <<-RUBY, __FILE__, __LINE__ + 1
122
122
  def bound_#{kind}_field(method, attrs = {})
123
123
  name = control_name(method)
124
- field_wrapper(:#{kind}_field, attrs.merge(:method => method)) do
125
- super
124
+ field_wrapper(:#{kind}_field, attrs.merge(:method => method)) do |new_attrs|
125
+ super(method, new_attrs)
126
126
  end
127
127
  end
128
128
  RUBY
@@ -130,37 +130,37 @@ module MerbFormFields
130
130
 
131
131
  def bound_check_box(method, attrs = {})
132
132
  name = control_name(method)
133
- field_wrapper(:check_box, attrs.merge(:method => method)) do
134
- super
133
+ field_wrapper(:check_box, attrs.merge(:method => method)) do |new_attrs|
134
+ super(method, new_attrs)
135
135
  end
136
136
  end
137
137
 
138
138
  def bound_radio_button(method, attrs = {})
139
139
  name = control_name(method)
140
- field_wrapper(:radio_button, attrs.merge(:method => method)) do
141
- super
140
+ field_wrapper(:radio_button, attrs.merge(:method => method)) do |new_attrs|
141
+ super(method, new_attrs)
142
142
  end
143
143
  end
144
144
 
145
145
  def bound_radio_group(method, arr)
146
146
  val = control_value(method)
147
147
 
148
- field_wrapper(:radio_group, attrs.merge(:method => method, :arr => arr)) do
149
- super
148
+ field_wrapper(:radio_group, attrs.merge(:method => method, :arr => arr)) do |new_attrs|
149
+ super(method, new_attrs)
150
150
  end
151
151
  end
152
152
 
153
153
  def bound_select(method, attrs = {})
154
154
  name = control_name(method)
155
- field_wrapper(:select, attrs.merge(:method => method)) do
156
- super
155
+ field_wrapper(:select, attrs.merge(:method => method)) do |new_attrs|
156
+ super(method, new_attrs)
157
157
  end
158
158
  end
159
159
 
160
160
  def bound_text_area(method, attrs = {})
161
161
  name = "#{@name}[#{method}]"
162
- field_wrapper(:text_area, attrs.merge(:method => method)) do
163
- super
162
+ field_wrapper(:text_area, attrs.merge(:method => method)) do |new_attrs|
163
+ super(method, new_attrs)
164
164
  end
165
165
  end
166
166
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb_form_fields
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacques Crocker
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-24 00:00:00 -08:00
12
+ date: 2009-03-22 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency