class RailsPage
def build_parts_from_hash!(content)
def build_parts_from_hash!(content) content.each do |k, v| (part(k) || parts.build(name: k.to_s, filter_id: '')).content = v end end
def find_by_path(url, live = true, clean = true)
def find_by_path(url, live = true, clean = true) found_page = super if found_page.nil? || found_page.is_a?(FileNotFoundPage) url = clean_url(url) if clean self if url.starts_with?(self.url) else found_page end end
def url
def url @url || super end
def url=(path)
def url=(path) @url = path end