Sha256: 8666ff1e36c4700f75a1c613db2f4639730181907cfbaf78d6616e182cc7a5bd

Contents?: true

Size: 832 Bytes

Versions: 72

Compression:

Stored size: 832 Bytes

Contents

class RailsPage < Page

  display_name "Application"
  attr_accessor :breadcrumbs

  def find_by_url(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=(path)
    @url = path
  end
  
  def url
    @url || super
  end
  
  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 
  
  alias_method "tag:old_breadcrumbs", "tag:breadcrumbs"
  tag 'breadcrumbs' do |tag|
    if tag.locals.page.is_a?(RailsPage) && tag.locals.page.breadcrumbs
      tag.locals.page.breadcrumbs
    else
      render_tag('old_breadcrumbs', tag)
    end
  end
  
end

Version data entries

72 entries across 72 versions & 3 rubygems

Version Path
trusty-cms-3.1.11 app/models/rails_page.rb
trusty-cms-3.1.10 app/models/rails_page.rb
trusty-cms-3.1.9 app/models/rails_page.rb
trusty-cms-3.1.8 app/models/rails_page.rb
trusty-cms-3.1.7 app/models/rails_page.rb
trusty-cms-3.1.6 app/models/rails_page.rb
trusty-cms-3.1.5 app/models/rails_page.rb
trusty-cms-3.1.3 app/models/rails_page.rb
trusty-layouts-extension-3.1.1 app/models/rails_page.rb
trusty-layouts-extension-3.1.0 app/models/rails_page.rb
trusty-layouts-extension-3.0.0 app/models/rails_page.rb
trusty-layouts-extension-2.0.4 app/models/rails_page.rb
trusty-layouts-extension-2.0.3 app/models/rails_page.rb
trusty-layouts-extension-2.0.2 app/models/rails_page.rb
trusty-layouts-extension-2.0.1 app/models/rails_page.rb
trusty-layouts-extension-2.0.0.pre.beta app/models/rails_page.rb
trusty-layouts-extension-1.1.0 app/models/rails_page.rb
trusty-layouts-extension-1.0.4 app/models/rails_page.rb
trusty-layouts-extension-1.0.3 app/models/rails_page.rb
trusty-layouts-extension-1.0.2 app/models/rails_page.rb