1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00

Replace gh-blog-url helper with a component.

Accessing `this` inside an `Ember.HTMLBars.makeBoundHelper` will not
always return the containing `view` object. Instead, use a component.
This commit is contained in:
Robert Jackson 2015-05-05 13:43:06 -04:00
parent 1bb2a145b7
commit 9250273d8d
3 changed files with 8 additions and 6 deletions

View file

@ -0,0 +1,7 @@
import Ember from 'ember';
var blogUrl = Ember.Component.extend({
tagName: ''
});
export default blogUrl;

View file

@ -1,6 +0,0 @@
import Ember from 'ember';
var blogUrl = Ember.HTMLBars.makeBoundHelper(function () {
return Ember.String.htmlSafe(this.get('config.blogUrl'));
});
export default blogUrl;

View file

@ -0,0 +1 @@
{{{config.blogUrl}}}