Skip to content

Instantly share code, notes, and snippets.

View gist:9b470214dd84d8602f8d98a78e0f48b7
### Keybase proof
I hereby claim:
* I am ehogberg on github.
* I am ehogberg (https://keybase.io/ehogberg) on keybase.
* I have a public key ASCuUPwSPHvg5F17fCAqjLnYlL1MpuoeAq3E98oX62IZ_Ao
To claim this, I am signing this object:
@ehogberg
ehogberg / gist:7935336
Created Dec 12, 2013
Location migration def.
View gist:7935336
class CreateLocations < ActiveRecord::Migration
def change
create_table :locations do |t|
t.references :company, index: true
t.string :name
t.text :legacy_url
t.string :address1
t.string :address2
t.string :city
t.string :region
@ehogberg
ehogberg / gist:7935296
Created Dec 12, 2013
Proposed schema for company location model
View gist:7935296
CREATE TABLE locations (
id integer NOT NULL,
company_id integer,
name character varying(255),
legacy_url text,
address1 character varying(255),
address2 character varying(255),
city character varying(255),
region character varying(255),
country character varying(255),
@ehogberg
ehogberg / hstore.rb
Created Jun 19, 2012
Postgres Hstore
View hstore.rb
class StatisticSummary < ActiveRecord::Base
attr_accessible :stats
belongs_to :domain
serialize :stats, ActiveRecord::Coders::Hstore
before_create :initialize_stats
private
def initialize_stats
View test
== Betternotes
A lightweight, web-hosted note recording application. Similar in functionality to Evernote (and it's ilk), but much
lighter weight.
== Features/Functionality
* Build using RoR
* Free-form rich text entry using Textile syntax.
* Generous, non-constrained tagging