Skip to content

Instantly share code, notes, and snippets.

View seanpdoyle's full-sized avatar

Sean Doyle seanpdoyle

View GitHub Profile
@seanpdoyle
seanpdoyle / application.rb
Last active February 15, 2024 23:06
Add a `binding.irb` to the test, then execute `ruby application.rb`
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails"
gem "sqlite3"
@seanpdoyle
seanpdoyle / 20140110012324_create_places.rb
Last active January 2, 2016 11:09
Code example for `paperclip-location`
require 'paperclip' #exclude this line in Rails apps
class CreatePlaces < ActiveRecord::Migration
include Paperclip::Schema #exclude this line in Rails apps
def self.change
create_table :places do |t|
t.boolean :location_locked, default: false, null: false
t.decimal :lat, precision: 10, scale: 15