Sha256: 0f2098c604ddb3501041705f86170c4dfbfbdbc74920ce3cdc7923f8780d4625
Contents?: true
Size: 470 Bytes
Versions: 9
Compression:
Stored size: 470 Bytes
Contents
require 'liquid_cms/context_association' module Cms class Context attr_reader :object def initialize(context = nil) @object = Cms.context_class ? context : nil end def pages @object ? @object.pages : Cms::Page.scoped(:extend => PageAssociationMethods) end def assets @object ? @object.assets : Cms::Asset.scoped(nil) end def components Cms::Component.files(Cms::Component.full_path(self)) end end end
Version data entries
9 entries across 9 versions & 1 rubygems