pages/app/models/refinery/page.rb
# Accessor method to get a page part object from a page.
# Example:
#
#    ::Refinery::Page.first.part_with_title(:body)
#
# Will return the Refinery::PagePart object with that title using the first page.
Accessor method to get a page part object from a page.
Example.



Will return the Refinery::PagePart object with that title using the first page.
Accessor method to get a page part object from a page . Example . Will return the Refinery :: PagePart object with that title using the first page .
def part_with_title(part_title)
      self.parts.detect do |part|
        part.title_matches?(part_title)
      end
    end
def part_with_title ( part_title ) self . parts . detect do | part | part . title_matches? ( part_title ) end end
Accessor method to get a page part object from a page.
Accessor method to get a page part object from a page .
# self.parts is usually already eager loaded so we can now just grab # the first element matching the title we specified.
part_title