Skip to content

Instantly share code, notes, and snippets.

@brett-richardson
Created March 13, 2014 21:38
Show Gist options
  • Select an option

  • Save brett-richardson/9537519 to your computer and use it in GitHub Desktop.

Select an option

Save brett-richardson/9537519 to your computer and use it in GitHub Desktop.

Revisions

  1. brett-richardson created this gist Mar 13, 2014.
    15 changes: 15 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    class User
    active_ingredients do
    phone Phone, validate: true, unique: true
    address Address, validate: true
    website Url, validate: true
    end
    end


    require 'phony'
    class Phone < ActiveIngredient
    def value
    Phony.normalize @value
    end
    end