Permalink
Browse files

Ensure correct root url handling (#1070)

* set rootURL on router correctly

* document readonly correctly

* use rootURL if present
  • Loading branch information...
1 parent 048afcb commit ff7aefeb99ea13392097ef9e347770cb27919040 @kylemellander kylemellander committed with marcoow Dec 2, 2016
@@ -8,7 +8,7 @@ export default {
name: 'ember-simple-auth',
initialize: function(registry) {
const config = ENV['ember-simple-auth'] || {};
- config.baseURL = ENV.baseURL;
+ config.baseURL = ENV.rootURL || ENV.baseURL;
Configuration.load(config);
setupSession(registry);
@@ -0,0 +1,9 @@
+module.exports = {
+ exists: function(variable, options) {
+ if (typeof variable !== 'undefined') {
+ return options.fn(this);
+ } else if (options.inverse) {
+ return options.inverse(this);
+ }
+ }
+};
@@ -11,9 +11,9 @@
{{#if access}}
<span class="label label-access-{{access}} pull-right">{{access}}</span>
{{/if}}
- {{#if readOnly}}
+ {{#exists readonly}}
<span class="label label-warning pull-right">readonly</span>
- {{/if}}
+ {{/exists}}
<h3 class="panel-title signature">
<strong class="name">`{{name}}`</strong>: <code>{{#crossLink type}}{{/crossLink}}</code>
</h3>
View
@@ -42,7 +42,8 @@ module.exports = function(defaults) {
quiet: true,
parseOnly: false,
lint: false,
- themedir: 'docs/theme'
+ themedir: 'docs/theme',
+ helpers: ['docs/theme/helpers/helpers.js']
}
});
@@ -4,7 +4,8 @@ import config from './config/environment';
const { Router: EmberRouter } = Ember;
const Router = EmberRouter.extend({
- location: config.locationType
+ location: config.locationType,
+ rootURL: config.rootURL
});
Router.map(function() {

0 comments on commit ff7aefe

Please sign in to comment.