lib/yaks/resource/form.rb in yaks-0.8.0.alpha vs lib/yaks/resource/form.rb in yaks-0.8.0.beta1

- old
+ new

@@ -2,21 +2,21 @@ class Resource class Form include Yaks::Mapper::Form::Config.attributes.remove(:dynamic_blocks) def [](name) - fields.find {|field| field.name == name}.value + fields.find {|field| field.name.equal? name}.value end def values - fields.each_with_object({}) do |field, values| + fields_flat.each_with_object({}) do |field, values| values[field.name] = field.value end end def fields_flat(fields = fields) fields.each_with_object([]) do |field, acc| - if field.type == :fieldset + if field.type.equal? :fieldset acc.concat(fields_flat field.fields) else acc << field end end