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
.credit-card { | |
padding: 7px 40px 7px 7px; | |
background: #FFF url('generic.png') 97% 50% no-repeat; | |
background-size: 25px 25px; | |
width: 100%; | |
} | |
input.visa { | |
background-image: url('visa.png'); | |
} |
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({ | |
size: 200, | |
email: '', | |
gravatarUrl: function() { | |
var email = this.get('email'), | |
size = this.get('size'); |
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
require 'spec_helper' | |
feature 'logging in' do | |
let(:user) { create :user } | |
scenario 'with correct credentials' do | |
visit login_path | |
fill_in 'session_email', with: user.email | |
fill_in 'session_password', with: user.password | |
click_button 'Log In' |
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 { test, moduleForComponent } from 'ember-qunit'; | |
moduleForComponent('gravatar-image', 'GravatarImageComponent', { | |
}); | |
test('it renders with size and e-mail', function() { | |
var component = this.subject(); | |
Ember.run(function(){ | |
component.set('size', 400); |
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(Ember.Validations.Mixin, { | |
errors: [], | |
validations: { | |
email: { | |
presence: true, | |
format: { | |
with: /^[\w+\-.]+@[a-z\d\-.]+\.[a-z]+$/i, |
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({ | |
searchText: null, | |
searchResults: [], | |
updateResults: function() { | |
var self = this; | |
var searchText = self.get('searchText'); |