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'; | |
import UserController from 'app/controllers/user'; | |
export default Ember.ObjectController.extend({ | |
decorateUser: function () { | |
var self = this; | |
this.get('user').then(function (user) { | |
var controller = UserController.create({ model: user }); |
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
var Accordion = React.createClass({ | |
changeCurrent: function (index) { | |
this.setState({ currentSection: index }); | |
}, | |
getInitialState: function() { | |
return { | |
currentSection: 0 | |
}; |
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
RSpec.describe User do | |
let(:user) { Fabricate(:user, password: 'C0mplex!', password_confirmation: 'C0mplex!') } | |
describe 'validations' do | |
describe 'email' do | |
it 'should be valid with a correct email' do | |
expect(user).to be_valid | |
end | |
it 'should have a valid format' do |
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'; | |
import icAjax from 'ic-ajax'; | |
var jsonRequest = function (options) { | |
options = Ember.merge({ | |
type: 'GET', | |
dataType: 'json', | |
contentType: 'application/json; charset=UTF-8' | |
}, options); |
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
var gulp = require('gulp'); | |
var connect = require('gulp-connect'); | |
var del = require('del'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var sass = require('gulp-sass'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var uncss = require('gulp-uncss'); | |
var nano = require('gulp-cssnano'); | |
var htmlmin = require('gulp-html-minifier'); | |
var rev = require('gulp-rev'); |
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:'Checkbox focus test', | |
actions: { | |
focusInAction() { | |
alert('Focused'); | |
} | |
} |
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({ | |
currentIndex: 0, | |
actions: { | |
changeIndex(value, e) { | |
if (e.which === 40 || e.which === 38) { | |
this.set('currentIndex', this.get('currentIndex') - (39 - e.which)); | |
} |