-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to ember-cli 2.16 and modules api
- Loading branch information
1 parent
b370149
commit a27f2a0
Showing
13 changed files
with
9,467 additions
and
11,728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import Ember from 'ember'; | ||
import Ember from 'ember'; //So far Ember.Handlebars.Utils.escapeExpression is not a Module | ||
import Helper from '@ember/component/helper'; | ||
import { getOwner } from "@ember/application" | ||
import { htmlSafe } from "@ember/string" | ||
import formatter from '../utils/variable-formatter'; | ||
|
||
const { getOwner } = Ember; | ||
|
||
export default Ember.Helper.extend({ | ||
export default Helper.extend({ | ||
compute(params, hash) { | ||
const cloudName = getOwner(this).resolveRegistration('config:environment').cloudinary.cloudName; | ||
const publicId = Ember.Handlebars.Utils.escapeExpression(params[0]); | ||
const parameters = formatter(hash); | ||
|
||
if (publicId) { | ||
return Ember.String.htmlSafe(`background-image: url('https://res.cloudinary.com/${cloudName}/image/upload${parameters}/${publicId}')`); | ||
return htmlSafe(`background-image: url('https://res.cloudinary.com/${cloudName}/image/upload${parameters}/${publicId}')`); | ||
} | ||
} | ||
}); |
Oops, something went wrong.