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

#current_rich_cms_adminObject



24
25
26
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 24

def current_rich_cms_admin
  Rich::Cms::Auth.admin
end

#current_rich_cms_admin_labelObject



28
29
30
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 28

def current_rich_cms_admin_label
  Rich::Cms::Auth.admin_label
end

#rich_cmsObject



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

def rich_cms
  render :file => File.expand_path("../../../../../../app/views/rich_cms.html.erb", __FILE__) if !!session[:rich_cms].try(:fetch, :display, nil)
end

#rich_cms_admin_classObject



16
17
18
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 16

def rich_cms_admin_class
  Rich::Cms::Auth.klass
end

#rich_cms_admin_inputsObject



20
21
22
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 20

def rich_cms_admin_inputs
  Rich::Cms::Auth.inputs
end

#rich_cms_editable_content_javascript_hashObject

////////////////////////////////// // Rich::Cms::Engine related //////////////////////////////////



36
37
38
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 36

def rich_cms_editable_content_javascript_hash
  "{#{Rich::Cms::Engine.editable_content.collect{|k, v| v.to_javascript_hash}.join ", "}}".html_safe
end

#rich_cms_login_required?Boolean

////////////////////////////////// // Rich::Cms::Auth related //////////////////////////////////

Returns:

  • (Boolean)


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

def 
  Rich::Cms::Auth.
end

#rich_cms_tag(selector, identifiers, options = {}) ⇒ Object



40
41
42
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 40

def rich_cms_tag(selector, identifiers, options = {})
  Rich::Cms::Engine.editable_content[selector].fetch(identifiers).to_tag options
end