Skip to content

Instantly share code, notes, and snippets.

View brandon-beacher's full-sized avatar
💭
🦑

Brandon Beacher brandon-beacher

💭
🦑
View GitHub Profile
:directories:
- app
- lib
:excludes:
- config/initializers
class ShipmentCycle < ActiveRecord::Base
belongs_to :plan, inverse_of: :shipment_cycles
has_many :gift_subscriptions, inverse_of: :shipment_cycle
has_many :plan_allotments, inverse_of: :shipment_cycle
has_many :subscriptions, inverse_of: :shipment_cycle
has_one :assortment, through: :plan
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
item.wow_feed_images.first.try(:url) ||
asset_path('feed-item-thumbnail-default.jpg')
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
#!/bin/bash
TMP_FILE=`mktemp /tmp/XXXXXX`
git diff "$1" "$2" > "$TMP_FILE.diff"
~/bin/subl -w -n "$TMP_FILE.diff"
= simple_form_for @profile, url: my_membership_path, html: { class: "form-horizontal" } do |form|
= form.simple_fields_for @profile.customer do |fields|
= fields.input :first_name
= fields.input :last_name, label: false
= form.simple_fields_for @profile.user do |fields|
= fields.input :email
= fields.input :password
= form.simple_fields_for @profile.customer do |fields|
= fields.input :zip_code
.form-actions
= simple_form_for @sign_up, url: sign_up_path, html: { class: "form-horizontal" } do |form|
= form.simple_fields_for @sign_up.customer do |fields|
= fields.input :first_name
= fields.input :last_name, label: false
= form.simple_fields_for @sign_up.user do |fields|
= fields.input :email
= fields.input :password
= form.simple_fields_for @sign_up.customer do |fields|
= fields.input :zip_code
.form-actions
if Rails.env.development?
Rake::Task["test"].enhance do
Rake::Task["db:migrate"].invoke
end
end