Module: Cmsable::CmsableHelper
- Defined in:
- app/helpers/cmsable/cmsable_helper.rb
Instance Method Summary collapse
Instance Method Details
#cmsable(name_or_model, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/helpers/cmsable/cmsable_helper.rb', line 9 def cmsable name_or_model, = {} model = get_model name_or_model = { readonly:false }.merge # Skip checking permission of set to readonly or # explicit authorisation is passed unless .include?(:authorised) or [:readonly] [:authorised] = (model) end content_or_editable_content model, ([:authorised] and ![:readonly]) end |
#cmsable_assets ⇒ Object
4 5 6 7 |
# File 'app/helpers/cmsable/cmsable_helper.rb', line 4 def cmsable_assets javascript_include_tag('cmsable/application') + stylesheet_link_tag('cmsable/application') end |