Sha256: 63d4da424a4820898eaa9918dfa4fe18a9189e4cb8b255b34bb09b1d09034074
Contents?: true
Size: 482 Bytes
Versions: 11
Compression:
Stored size: 482 Bytes
Contents
module Cms # Allows STI classes to be handled by a single resource controller # i.e. LoginPortlet can be handled by the Cms::PortletController as a resource. # # # This is a simpler version of this solution: https://gist.github.com/sj26/5843855 module PolymorphicSingleTableInheritance # Override model_name to return base_class Name. def model_name if self == base_class super else base_class.model_name end end end end
Version data entries
11 entries across 11 versions & 2 rubygems