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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
value: '<h1>Demo header</h1>This is some <i>italic</i> text.', | |
options: { | |
actions:[ | |
{ | |
name: 'titre', | |
icon: 'Z', | |
result: () => { |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
totalCosts:Ember.computed('pricing', | |
function(){ | |
var costs = {}; | |
costs["price"]=this.get('pricing').get('buy_price'); | |
costs["subscription"]=this.get('pricing').buy_subscription; | |
costs["perRoom"]=this.get('pricing').buy_per_room; | |
return costs; | |
}), |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
thePrice: new Pricing, | |
totalCosts:Ember.computed('pricing', | |
function(){ | |
var costs = {}; | |
costs["price"]=5; | |
costs["subscription"]=2; |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
dateDisabled: Ember.computed('foo',function(){ | |
console.log(this.get('foo')); | |
return [ | |
function(date){ | |
//console.log(this.get('foo')); | |
let day = date.getDate() | |
if (day & 1){ |
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
Equality | |
The equal? method is defined by Object to test whether two values refer to exactly the same | |
object. For any two distinct objects, this method always returns false: | |
a = "Ruby" # One reference to one String object | |
b = c = "Ruby" # Two references to another String object | |
a.equal?(b) # false: a and b are different objects | |
b.equal?(c) # true: b and c refer to the same object | |
By convention, subclasses never override the equal? method. The == operator is the most common |
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
undefined method `each' for "true":String | |
{"utf8"=>"✓", | |
"_method"=>"put", | |
"authenticity_token"=>"TTCSyAiy98vRZOKQDljKlkHYxRiLKBSnhL0iGUVMUq8=", | |
"shared_produit"=>{"shared"=>"true"}, | |
"commit"=>"Autoriser partage", | |
"locale"=>"fr", | |
"produit_id"=>"37"} |