1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00
Commit graph

18 commits

Author SHA1 Message Date
Steve Klabnik
b516bda9c5 Merge branch 'active_model_support' of https://github.com/kurko/draper 2012-05-09 14:37:12 -04:00
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
Vasiliy Ermolovich
49f01d9086 rework generators 2012-04-28 23:02:22 +03:00
Simon COURTOIS
108d4baaaf Adding a :polymorphic option to decorates_association 2012-03-08 14:21:26 +01:00
Morton Jonuschat
53586b8a38 Allow multiple allows 2012-02-13 10:58:07 +01:00
Michael Fairley
cb8820083f Add a require that got left out 2012-01-05 09:30:28 -08:00
Steve Klabnik
10d2a6ed9a explicitly require-ing to fix odd order issue 2012-01-05 10:47:18 -05:00
Jeff Casimir
91bfd0138e Debugging require ordering issue on Travis 2011-11-01 17:09:20 -04:00
Jeff Casimir
57a159362c Debugging require ordering issue on Travis 2011-11-01 17:07:11 -04:00
Justin Ko
6a595ab20f Move spec/samples to spec/support/samples 2011-10-24 11:48:53 -06:00
Jeff Casimir
39fc5c9513 Rewrote technique for getting view_context/helper access 2011-10-08 01:06:19 -04:00
Jeff Casimir
6c10302cd3 Simplifying development dependencies 2011-10-07 16:37:36 -04:00
Alex Rothenberg
16e8868da1 added generator specs using the ammeter gem 2011-10-06 16:58:04 -04:00
Jeff Casimir
3edcab921a Simplifying loading in spec_helper thanks to new dependency style 2011-08-27 23:52:03 -05:00
Theo Cushion
2614037c74 Feature: Added Ruby 1.8 support 2011-08-10 14:01:22 +01:00
Jeff Casimir
36911776f3 Implementing lazy_helpers and improving test coverage 2011-07-27 23:45:09 -05:00
Jeff Casimir
6a6f7e68da Pulling larger example classes out into spec/samples 2011-07-10 21:46:30 -04:00
Jeff Casimir
a3804b0662 Bring over generator structure from rails_decorators 2011-06-30 18:19:48 -04:00