Class: ActionView::Base
- Inherits:
-
Object
- Object
- ActionView::Base
- Defined in:
- lib/rich/cms/actionpack/action_view/base.rb
Instance Method Summary collapse
- #display_rich_cms? ⇒ Boolean
- #link(name, options = nil) ⇒ Object
- #rich_cms ⇒ Object
- #rich_cms_tag(*args) ⇒ Object
Instance Method Details
#display_rich_cms? ⇒ Boolean
9 10 11 |
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 9 def display_rich_cms? !!session[:rich_cms].try(:fetch, :display, nil) end |
#link(name, options = nil) ⇒ Object
13 14 15 16 |
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 13 def link(name, = nil) = {:class => || name.underscore} unless .is_a?(Hash) link_to name, "#", end |
#rich_cms ⇒ Object
5 6 7 |
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 5 def rich_cms render :file => File.("../../../../../../app/views/rich_cms.html.erb", __FILE__) if display_rich_cms? end |
#rich_cms_tag(*args) ⇒ Object
18 19 20 |
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 18 def rich_cms_tag(*args) Rich::Cms::Engine.to_content_tag *args end |