gluttonberg/app/models/page_localization.rb
# Returns an array of content localizations
Returns an array of content localizations
Returns an array of content localizations
def contents
      @contents ||= begin
        contents = Gluttonberg::Content.localization_associations.inject([]) do |memo, assoc|
          memo += send(assoc).all
        end
        Gluttonberg::Content.non_localized_associations.inject(contents) do |memo, assoc|
          contents += page.send(assoc).all
        end
      end
    end
def contents @contents ||= begin contents = Gluttonberg :: Content . localization_associations . inject ( [ ] ) do | memo , assoc | memo += send ( assoc ) . all end Gluttonberg :: Content . non_localized_associations . inject ( contents ) do | memo , assoc | contents += page . send ( assoc ) . all end end end
Returns an array of content localizations
Returns an array of content localizations
# First collect the localized content # Then grab the content that belongs directly to the page