Class: FrontEndBuilds::AdminController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- FrontEndBuilds::AdminController
- Defined in:
- app/controllers/front_end_builds/admin_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#index ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/front_end_builds/admin_controller.rb', line 6 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 plain: html end |