This file contains hidden or 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
module Core | |
module AssetHelper | |
def self.root_path | |
String === Rails.root ? Pathname.new(Rails.root) : Rails.root | |
end | |
def self.add_extension(filename, extension) | |
filename.to_s.split('.').include?(extension) ? filename : "#{filename}.#{extension}" | |
end |
This file contains hidden or 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
import Ember from 'ember'; | |
const Component = Ember.Component.extend({ | |
layoutName: "components/my-component", | |
tagName: "form", | |
foo: null | |
}); | |
Component.reopenClass({ | |
positionalParams: ["foo"] |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
counter: Ember.computed({ | |
get(){ | |
return 0; | |
}, | |
set(k,v){ |
This file contains hidden or 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
{"lastUpload":"2020-07-31T15:59:44.337Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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
ubuntu@ip-172-31-21-253:/var/deploy/vroom-staging/web_head/releases/20161004023037/front-end$ ./node_modules/.bin/ember build --environment="production" | |
Could not start watchman; falling back to NodeWatcher for file system events. | |
Visit http://ember-cli.com/user-guide/#watchman for more info. | |
⠋ BuildingTorii is installed but not configured in config/environment.js! | |
Build failed. | |
File: assets/vendor.js (123701:7) | |
The Broccoli Plugin: [UglifyWriter] failed with: | |
Error | |
at new JS_Parse_Error (<anonymous>:1545:18) | |
at js_error (<anonymous>:1553:11) |
This file contains hidden or 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
const fieldList = [ | |
{ label: 'Foo Fields', fields: [{name: 'foo', selected: false}] }, | |
{ label: 'Bar Fields', fields: [{name: 'bar', selected: true}] } | |
] | |
fields: Ember.computed('[email protected]', function() { | |
return this.get("fieldList").mapBy("fields"); | |
}), | |
enabledFields: Ember.computed("fields", "[email protected]", function(){ |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
building: Ember.computed(function(){ | |
return {id: 1, name: "BUILDING!"} | |
}) | |
}); |
This file contains hidden or 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
import Ember from 'ember'; | |
class ItemRating extends HTMLElement { | |
createdCallback () { | |
this.insertAdjacentHTML('afterbegin', ` | |
<a data-rating="1">★</a> | |
<a data-rating="2">★</a> | |
<a data-rating="3">★</a> | |
<a data-rating="4">★</a> | |
<a data-rating="5">★</a> |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'th', | |
downArrow: '▼', | |
upArrow: '▲', | |
actions: { | |
sortBy(model, sortProperty, order) { | |
// Remove all selected classes from all the header links |
This file contains hidden or 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
class Core::PaginationSerializer < ActiveModel::ArraySerializer | |
def initialize(object, options={}) | |
meta_key = options[:meta_key] || :meta | |
options[meta_key] ||= {} | |
pobject = options[:pagination_object] || object | |
options[meta_key][:pagination] = { | |
current_page: pobject.current_page, | |
next_page: pobject.next_page, |
NewerOlder