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
+------+ +-----+ +-----+ +-----+ | |
| | | | | | | | | |
| Foo +-->| Bar +---+ Baz |<--+ Moo | | |
| | | | | | | | | |
+------+ +-----+ +--+--+ +-----+ | |
^ | | |
| V | |
.-------------+-----------------------. |
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
# Copy and paste this to the rails console to test your email settings | |
class MyMailer < ActionMailer::Base | |
def test_email | |
set_tracking_headers 'test_campaign' | |
@recipients = "benoror@gmail.com" | |
@from = "Equipo Nimbo X <hola@" + Rails.application.secrets.sparkpost_domain + ">" | |
@subject = "sparkpost email test with open & click tracking" | |
@body = "This is a test email. With a <a href=\"http://blog.nimbo-x.com/nimbo-x-gold/\">test link</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
/* | |
* Helper to detect an empty Object ( {} ) | |
* More info: https://github.com/emberjs/rfcs/issues/82 | |
*/ | |
import Ember from 'ember'; | |
const { Helper, isBlank } = Ember; | |
export function isEmptyObject(params) { |
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
function predict_cd(options = {}) { | |
if(!options.cause) { | |
return Error("c'mon, you need at least a cause!"); | |
} | |
cause = options.cause; | |
// optional to increase % confidence | |
gender = options.gender || null; | |
age = options.age || null; | |
pet_name = options.pet_name || null; | |
// do your magic |
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
// app/transforms/array.js | |
import Ember from 'ember'; | |
import DS from 'ember-data'; | |
export default DS.Transform.extend({ | |
deserialize: function(value) { | |
if (Ember.isArray(value)) { | |
return Ember.A(value); | |
} else { | |
return Ember.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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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' | |
}); |
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
//... | |
export default Route.extend({ | |
//... | |
actions: { | |
//... | |