Module: Coco::IntegrationHelper

Included in:
Helpers
Defined in:
app/helpers/coco/integration_helper.rb

Instance Method Summary collapse

Instance Method Details

#coco_javascript_file_path(context, dev: ENV["COCO_PATH"]) ⇒ Object



7
8
9
# File 'app/helpers/coco/integration_helper.rb', line 7

def coco_javascript_file_path(context, dev: ENV["COCO_PATH"])
  File.join(Coco::Engine.root, "app/assets/build/coco/#{context}#{".dev" if dev}.js")
end

#coco_javascript_tag(context, dev: ENV["COCO_PATH"], **opts) ⇒ Object



3
4
5
# File 'app/helpers/coco/integration_helper.rb', line 3

def coco_javascript_tag(context, dev: ENV["COCO_PATH"], **opts)
  javascript_include_tag "coco/#{context}#{".dev" if dev}", **opts
end

#coco_stylesheet_file_path(context, dev: ENV["COCO_PATH"], **opts) ⇒ Object



15
16
17
# File 'app/helpers/coco/integration_helper.rb', line 15

def coco_stylesheet_file_path(context, dev: ENV["COCO_PATH"], **opts)
  File.join(Coco::Engine.root, "app/assets/build/coco/#{context}#{".dev" if dev}.css")
end

#coco_stylesheet_tag(context, dev: ENV["COCO_PATH"], **opts) ⇒ Object



11
12
13
# File 'app/helpers/coco/integration_helper.rb', line 11

def coco_stylesheet_tag(context, dev: ENV["COCO_PATH"], **opts)
  stylesheet_link_tag "coco/#{context}#{".dev" if dev}", **opts
end