Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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({ | |
store: Ember.inject.service(), | |
appName: 'Ember Twiddle', | |
actions: { | |
create() { | |
this.get('store').createRecord('myModel'); | |
} |
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({ | |
testArray: Ember.computed(function() { | |
let a = []; | |
a[5] = 'foo'; | |
a[6] = 'bar'; | |
return a; |
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
<?php | |
App::uses('TimeHelper', 'View/Helper'); | |
/** | |
* CustomTimeHelper. | |
* | |
* Introduces an additional parameter $onlyDate to niceShort. | |
* Set it to true to hide the time-information. | |
* | |
* To use it, just save this file in /app/View/Helper/CustomTimeHelper.php |
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
<?php | |
App::uses('FormHelper', 'View/Helper'); | |
/** | |
* BootstrapFormHelper. | |
* | |
* Applies styling-rules for Bootstrap 3 | |
* | |
* To use it, just save this file in /app/View/Helper/BootstrapFormHelper.php | |
* and add the following code to your AppController: |