Sha256: 0f7a22d8fd5ed6f4833e379921277d4bde0fa96cff97c0dbd9cc29fbf486ecb9
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
module ActionView class Base 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::Auth related # ////////////////////////////////// def rich_cms_login_required? Rich::Cms::Auth.login_required? end def rich_cms_admin_class Rich::Cms::Auth.klass end def rich_cms_admin_inputs Rich::Cms::Auth.inputs end def current_rich_cms_admin Rich::Cms::Auth.admin end def current_rich_cms_admin_label Rich::Cms::Auth.admin_label end # ////////////////////////////////// # // Rich::Cms::Engine related # ////////////////////////////////// def rich_cms_editable_content_javascript_hash "{#{Rich::Cms::Engine.editable_content.collect{|k, v| v.to_javascript_hash}.join ", "}}".html_safe end def rich_cms_tag(selector, identifiers, options = {}) Rich::Cms::Engine.editable_content[selector].fetch(identifiers).to_tag options end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rich_cms-3.0.2 | lib/rich/cms/actionpack/action_view/base.rb |
rich_cms-3.0.1 | lib/rich/cms/actionpack/action_view/base.rb |
rich_cms-3.0.0 | lib/rich/cms/actionpack/action_view/base.rb |