draper/spec
Bruno Castro 5e4f529bb8 fix: Make CollectionDecorator respond_to? to ORM methods (#850)
## Testing
1. Create a decorator for the model and its association
```ruby
class OrderHistoryDecorator < Draper::Decorator
  delegate_all
end

class OrderDecorator < Draper::Decorator
  delegate_all

  decorates_association :order_histories, with: OrderHistoryDecorator
end
```

2. Call `respond_to?` with some ORM method allowed by the strategy
```ruby
[1] pry(main)> order.order_histories.decorate.respond_to?(:includes)
=> true
```

## References
* method_missing [usage](https://thoughtbot.com/blog/always-define-respond-to-missing-when-overriding)
2019-03-16 14:15:16 -05:00
..
draper fix: Make CollectionDecorator respond_to? to ORM methods (#850) 2019-03-16 14:15:16 -05:00
dummy Feature: ActiveJob Integration and Documentation (#817) 2017-09-11 09:35:14 -07:00
generators ApplicationDecorator generator (#796) 2017-04-05 13:43:27 -05:00
integration
performance
support
spec_helper.rb When decoration fails, show original class (#821) 2017-10-12 11:55:00 -05:00