lib/trestle/form/builder.rb in trestle-0.8.3 vs lib/trestle/form/builder.rb in trestle-0.8.4

- old
+ new

@@ -7,9 +7,13 @@ undef_method :display cattr_accessor :fields self.fields = {} + def errors(name) + object.errors[name].to_a + end + def self.register(name, klass) rename_existing_helper_method(name) self.fields[name] = klass end