You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
haines edited this page Jan 21, 2013
·
3 revisions
Draper automatically includes the Decoratable model (which gives models a decorate method) into ActiveRecord::Base and Mongoid::Document (Mongoid 3.0+). If you are using another ORM, or decorating plain old Ruby objects, then you need to include it manually.
Mongoid 2.x
Mongoid 2.x does not provide a load hook for automatic inclusion of the Decoratable module. You can put the following in an initializer: