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
# File 'app/helpers/cmsable/cmsable_helper.rb', line 9

def cmsable name_or_model, options = {}

  model = get_model name_or_model

  options = {
    authorised:authorised?(model)
  }.merge options

  content_or_editable_content model, options[:authorised]

end

#cmsable_assetsObject



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