A simple and Rubyish view helper for Rails 3, Rails 4 and Rails 5. Keep your helpers and views Object-Oriented!
Automatically mixes decorator module into corresponding model only when: - passing a model or collection of models or an instance of ActiveRecord::Relation from controllers to views - rendering partials with models (using :collection or :object or :locals explicitly or implicitly) - fetching already decorated Active Record model object's association - the decorator module runs in the model's context. So, you can directly call any attributes or methods in the decorator module - since decorators are considered as sort of helpers, you can also call any ActionView's helper methods such as content_tag or link_to
ActiveDecorator alternatives and related gems
Based on the "Decorators" category
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of ActiveDecorator or a related project?
ActiveDecorator RecommendationsThere are no recommendations yet. Be the first to promote ActiveDecorator!
Have you used ActiveDecorator? Share your experience. Write a short recommendation and ActiveDecorator, you and your project will be promoted on Awesome Ruby.
Recently added ActiveDecorator resources
There are so many presenter/decorator gems aiming to achieve the same goal: bridging between model and view. The differences are mostly about implicit vs explicit interface design. This article lists many of the techniques used, so you will know what the gem owners have done in order to let you type less.Article Added by lulalala // lulalala.logdown.com // 5 months ago