Sha256: 250590074257d8b30411ec38b129118886146f36dfa11c1b7867b8a6de52c120

Contents?: true

Size: 604 Bytes

Versions: 2

Compression:

Stored size: 604 Bytes

Contents

require "ember-cli/capture"

module EmberRailsHelper
  def include_ember_index_html(name, &block)
    markup_capturer = EmberCLI::Capture.new(sprockets: self, &block)

    head, body = markup_capturer.capture

    html = EmberCLI[name].index_html(
      sprockets: self,
      head: head,
      body: body,
    )

    render inline: html
  end

  def include_ember_script_tags(name, **options)
    javascript_include_tag(*EmberCLI[name].exposed_js_assets, options)
  end

  def include_ember_stylesheet_tags(name, **options)
    stylesheet_link_tag(*EmberCLI[name].exposed_css_assets, options)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ember-cli-rails-0.4.1 app/helpers/ember_rails_helper.rb
ember-cli-rails-0.4.0 app/helpers/ember_rails_helper.rb