Class: ActionView::Base
- Inherits:
-
Object
- Object
- ActionView::Base
- Defined in:
- lib/rich/cms/actionpack/action_view/base.rb
Instance Method Summary collapse
- #current_rich_cms_admin ⇒ Object
- #current_rich_cms_admin_label ⇒ Object
- #rich_cms ⇒ Object
- #rich_cms_admin_class ⇒ Object
- #rich_cms_admin_inputs ⇒ Object
-
#rich_cms_editable_content_javascript_hash ⇒ Object
////////////////////////////////// // Rich::Cms::Engine related //////////////////////////////////.
-
#rich_cms_login_required? ⇒ Boolean
////////////////////////////////// // Rich::Cms::Auth related //////////////////////////////////.
- #rich_cms_tag(selector, identifiers, options = {}) ⇒ Object
Instance Method Details
#current_rich_cms_admin ⇒ Object
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_label ⇒ Object
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_cms ⇒ Object
4 5 6 |
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 4 def rich_cms render :file => File.("../../../../../../app/views/rich_cms.html.erb", __FILE__) if !!session[:rich_cms].try(:fetch, :display, nil) end |
#rich_cms_admin_class ⇒ Object
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_inputs ⇒ Object
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_hash ⇒ Object
////////////////////////////////// // 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 //////////////////////////////////
12 13 14 |
# File 'lib/rich/cms/actionpack/action_view/base.rb', line 12 def rich_cms_login_required? Rich::Cms::Auth.login_required? 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, = {}) Rich::Cms::Engine.editable_content[selector].fetch(identifiers).to_tag end |