Sha256: 402ec16d44a362bf16216ca409067024897e33b92a44d687a1d2c025224699d1

Contents?: true

Size: 517 Bytes

Versions: 8

Compression:

Stored size: 517 Bytes

Contents

module ActionView
  class Base

    def rich_cms
      render :file => File.expand_path("../../../../../../app/views/rich_cms.html.erb", __FILE__) if display_rich_cms?
    end

    def display_rich_cms?
      !!session[:rich_cms].try(:fetch, :display, nil)
    end

    def link(name, options = nil)
      options = {:class => options || name.underscore} unless options.is_a?(Hash)
      link_to name, "#", options
    end

    def rich_cms_tag(*args)
      Rich::Cms::Engine.to_content_tag *args
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rich_cms-2.1.7 lib/rich/cms/actionpack/action_view/base.rb
rich_cms-2.1.6 lib/rich/cms/actionpack/action_view/base.rb
rich_cms-2.1.5 lib/rich/cms/actionpack/action_view/base.rb
rich_cms-2.1.4 lib/rich/cms/actionpack/action_view/base.rb
rich_cms-2.1.3 lib/rich/cms/actionpack/action_view/base.rb
rich_cms-2.1.2 lib/rich/cms/actionpack/action_view/base.rb
rich_cms-2.1.1 lib/rich/cms/actionpack/action_view/base.rb
rich_cms-2.1.0 lib/rich/cms/actionpack/action_view/base.rb