Module: NoDevent::Helper
- Defined in:
- lib/nodevent.rb
Instance Method Summary collapse
Instance Method Details
#javascript_include_nodevent ⇒ Object
62 63 64 |
# File 'lib/nodevent.rb', line 62 def javascript_include_nodevent "<script src='#{nodevent_url}' type='text/javascript'></script>".html_safe end |
#nodevent_url ⇒ Object
56 57 58 59 60 61 |
# File 'lib/nodevent.rb', line 56 def nodevent_url host = NoDevent::Emitter.config['host'] namespace = NoDevent::Emitter.config['namespace'] namespace = '/' + namespace unless namespace[0] == '/' "#{host}/api#{namespace}" end |