active_decorator
active_decorator copied to clipboard
ORM agnostic truly Object-Oriented view helper for Rails 4, 5, 6, and 7
Hi there, thanks for creating such a great project! We noticed that a particular request in our Rails app was slow. Eventually we traced the problem to a decorator that...
It's okay to use decorator methods in actionview, but just like the following case, if I use decorator method in other decorator, it will be confronted with error. it will...
From the readme, it says: ```ruby ActiveDecorator::ViewContext.run_with ApplicationController.new.view_context do ## perform some heavy jobs here end ``` However, what I did is the following ``` ↪ rails runner 'ActiveDecorator::ViewContext.run_with(ApplicationController.new.view_context) {...
To enable ActiveDecorator in Sinatra, register it like: ``` require "active_decorator/sinatra" register ActiveDecorator::Sinatra ``` Then ActiveDecorator::Sinatra reads `ROOT/decorators/*_decorator.rb`, and decorates instance variables in `scope` and local variables passed via `render`...
patch for : {:foo => foo} %>
I use single table inheritance quite a lot so I made this in order to avoid having to create a decorator for every single child class if all I need...
I have added support for decorating Mongoid::Criteria objects. I usually do `@thing = Thing.all` and the Mongoid::Criteria object that returns fails to get decorated when its passed to the view.
With this series of patches, a decorator can be explicitly set on a model. It is recommended to squash the commits when pulling this code. I was not able to...
If error occered within link_to medhod, the exeception messege is incorrect. exapmle: link_to "xxx", :xxx (xxx_path is not routable)
I attempted to update my Ruby version from 2.7.7 to 3.0.5, and now I am encountering the following error when running RSpec: ## Error Details The error stack trace is...