In config/production.rb
config.action_mailer.asset_host = "https://123123.cloudfront.net"
In config/initializers/mail_image_tag.rb
module ActionView
<main> | |
<% @posts.each do |post| %> | |
<!-- Under the hood, we find the right file in webpack and attach the expected object to window.Post --> | |
<Post | |
title={post.title} | |
description={post.description} | |
/> | |
<% end %> | |
</main> |
# The rubygems.org grocer-pushpackager needs a bump. Ride that <del>dragon</del> master. | |
gem 'grocer-pushpackager', git: 'git@github.com:layervault/grocer-pushpackager.git' | |
# Houston will help us send the notifications themselves. | |
gem 'houston' |
<<~MSG | |
Squiggle | |
MSG | |
<<-MSG | |
No-squigs | |
MSG | |
CHONSTANT = 'CONSTANT' |
class PayrollCalculator | |
def initialize(payroll, options = {}) | |
@payroll = payroll | |
@skip_benefits = options[:skip_benefits] | |
@skip_taxes = options[:skip_taxes] | |
@skip_donations = options[:skip_donations] | |
end | |
def calculate | |
if !@skip_benefits |
def taxes | |
PayrollCalculator::Taxes.calculate( | |
@payroll.only_pay_and_location_data | |
) | |
end |
# This methods adds 2 numbers together | |
# @param x [Number] The first number that you would | |
# like to add | |
# @param y [Number] The number you would | |
# like to add to the first number | |
# @return [Number] The result of adding `x` and `y` together | |
def add(x, y) | |
x + y | |
end |
In config/production.rb
config.action_mailer.asset_host = "https://123123.cloudfront.net"
In config/initializers/mail_image_tag.rb
module ActionView
'use strict'; | |
const http = require('https'); | |
// Forward the button press onto our Heroku app | |
// as a POST request with a JSON body. | |
exports.handler = (event, context, callback) => { | |
const params = { | |
serialNumber: event.serialNumber, | |
event: event |
require 'rails_helper' | |
RSpec.describe FrequentFlierCreator do | |
describe '.create' do | |
subject do | |
described_class.create( | |
customer, | |
starting_balance, | |
status_level | |
) |
RSpec.describe User do | |
describe '#full_name' do | |
subject do | |
described_class.new(first_name, middle_name, last_name) | |
end | |
let(:first_name) { 'Roy' } | |
let(:last_name) { 'Biv' } | |
context 'middle name is given' do | |
let(:middle_name) { 'Gee' } |