Class: ActionView::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rich/cms/actionpack/action_view/base.rb

Instance Method Summary collapse

Instance Method Details

#display_rich_cms?Boolean

Returns:

  • (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


13
14
15
16
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 13

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

#rich_cmsObject



5
6
7
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 5

def rich_cms
  render :file => File.expand_path("../../../../../../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. *args
end