draper/spec/support/samples
Alexandre de Oliveira 19496f0c4f Adds support for ActiveModel::Errors
The goal here is to improve ActiveModel support so that Draper can
work seamlessly with Rails' FormHelpers, proxying the model's #errors
method.

I also added support for ActiveModel::Errors, adding a proxy to the
model's #errors method only if it's a descendant of
ActiveModel::Validations.

Also some refactoring was done. Draper now proxies #to_param and #id
methods only if the model is an ActiveModel descendant.

Other things I did include:

- created Draper::ActiveModelSupport::Proxies, which contains the
  methods for proxying default methods(to_param, id, etc) depending
on the ancestors
- wrote specs for class with ActiveModel as ancestor
- wrote specs for class without ActiveModel as ancestor
2012-05-07 23:24:01 -03:00
..
active_model.rb Adds support for ActiveModel::Errors 2012-05-07 23:24:01 -03:00
active_record.rb Adds support for ActiveModel::Errors 2012-05-07 23:24:01 -03:00
application_controller.rb Convert Draper to using a Railtie for loading 2012-02-24 16:40:39 -05:00
application_helper.rb add new lines 😓 2012-04-25 23:12:30 +03:00
decorator.rb add new lines 😓 2012-04-25 23:12:30 +03:00
decorator_with_allows.rb add new lines 😓 2012-04-25 23:12:30 +03:00
decorator_with_application_helper.rb Zomg removing trailing whitespace. 2012-02-13 10:24:31 -05:00
decorator_with_denies.rb Zomg removing trailing whitespace. 2012-02-13 10:24:31 -05:00
decorator_with_multiple_allows.rb Add forgotten sample file 2012-02-13 16:06:46 +01:00
namespaced_product.rb add namespaced samples 2011-11-01 01:55:20 +08:00
namespaced_product_decorator.rb Resolving load-order issue on CI 2011-11-30 11:25:25 -05:00
non_active_model_product.rb Adds support for ActiveModel::Errors 2012-05-07 23:24:01 -03:00
product.rb Makes decorates_association work transparently with Plain Old Ruby Objects. 2012-03-13 22:26:54 -03:00
product_decorator.rb Move spec/samples to spec/support/samples 2011-10-24 11:48:53 -06:00
some_thing.rb Adding a :polymorphic option to decorates_association 2012-03-08 14:21:26 +01:00
some_thing_decorator.rb Adding a :polymorphic option to decorates_association 2012-03-08 14:21:26 +01:00
specific_product_decorator.rb add new lines 😓 2012-04-25 23:12:30 +03:00
widget.rb Allow decorators to be inferred (Take 3) 2011-11-09 21:31:48 -06:00
widget_decorator.rb Allow decorators to be inferred (Take 3) 2011-11-09 21:31:48 -06:00