Sha256: 2961cf85828fa950567750f4612a4e928abf157831b16b410e2ca0200eec7cfa
Contents?: true
Size: 561 Bytes
Versions: 11
Compression:
Stored size: 561 Bytes
Contents
require_dependency "front_end_builds/application_controller" module FrontEndBuilds class AdminController < ApplicationController def index # We need to pass the url which the host app has mounted the # engine to into index.html.erb, so the ember app's router # will work appropriately. # Trim trailing slash marks baseURL = admin_path[1..-2] html = render_to_string html = html.sub('BASEURL/', baseURL) html = html.sub("baseURL: ''", "baseURL: '#{baseURL}'") render text: html end end end
Version data entries
11 entries across 11 versions & 1 rubygems