Skip to content

Instantly share code, notes, and snippets.

@chumpy
Last active December 18, 2015 15:58

Revisions

  1. chumpy revised this gist Jun 18, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions state_selector.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    State Selector
    ==============
    State Selector
    ==============

    ```ruby
    def us_states
  2. chumpy revised this gist Jun 18, 2013. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions state_selector.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    # State Selector #

    State Selector
    ==============

    ```ruby
    def us_states
    [
  3. chumpy revised this gist Jun 18, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion state_selector.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # State Selector
    # State Selector #

    ```ruby
    def us_states
  4. chumpy revised this gist Jun 18, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions state_selector.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    = State Selector
    # State Selector

    ```ruby
    def us_states
    @@ -59,5 +59,5 @@
    end
    ```
    ```ruby
    = f.select :state, us_states, :class => 'required'
    = f.select :state, us_states
    ```
  5. chumpy revised this gist Jun 18, 2013. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions state_selector.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    =State Selector
    ---------------
    = State Selector

    ```ruby
    def us_states
    [
    @@ -57,4 +57,7 @@
    ['Wyoming', 'WY']
    ]
    end
    ```
    ```ruby
    = f.select :state, us_states, :class => 'required'
    ```
  6. chumpy renamed this gist Jun 18, 2013. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion state_selector.rb → state_selector.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    =State Selector
    ---------------
    ```ruby
    def us_states
    [
    ['Alabama', 'AL'],
    @@ -53,4 +56,5 @@ def us_states
    ['Wisconsin', 'WI'],
    ['Wyoming', 'WY']
    ]
    end
    end
    ```
  7. chumpy created this gist Jun 18, 2013.
    56 changes: 56 additions & 0 deletions state_selector.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,56 @@
    def us_states
    [
    ['Alabama', 'AL'],
    ['Alaska', 'AK'],
    ['Arizona', 'AZ'],
    ['Arkansas', 'AR'],
    ['California', 'CA'],
    ['Colorado', 'CO'],
    ['Connecticut', 'CT'],
    ['Delaware', 'DE'],
    ['District of Columbia', 'DC'],
    ['Florida', 'FL'],
    ['Georgia', 'GA'],
    ['Hawaii', 'HI'],
    ['Idaho', 'ID'],
    ['Illinois', 'IL'],
    ['Indiana', 'IN'],
    ['Iowa', 'IA'],
    ['Kansas', 'KS'],
    ['Kentucky', 'KY'],
    ['Louisiana', 'LA'],
    ['Maine', 'ME'],
    ['Maryland', 'MD'],
    ['Massachusetts', 'MA'],
    ['Michigan', 'MI'],
    ['Minnesota', 'MN'],
    ['Mississippi', 'MS'],
    ['Missouri', 'MO'],
    ['Montana', 'MT'],
    ['Nebraska', 'NE'],
    ['Nevada', 'NV'],
    ['New Hampshire', 'NH'],
    ['New Jersey', 'NJ'],
    ['New Mexico', 'NM'],
    ['New York', 'NY'],
    ['North Carolina', 'NC'],
    ['North Dakota', 'ND'],
    ['Ohio', 'OH'],
    ['Oklahoma', 'OK'],
    ['Oregon', 'OR'],
    ['Pennsylvania', 'PA'],
    ['Puerto Rico', 'PR'],
    ['Rhode Island', 'RI'],
    ['South Carolina', 'SC'],
    ['South Dakota', 'SD'],
    ['Tennessee', 'TN'],
    ['Texas', 'TX'],
    ['Utah', 'UT'],
    ['Vermont', 'VT'],
    ['Virginia', 'VA'],
    ['Washington', 'WA'],
    ['West Virginia', 'WV'],
    ['Wisconsin', 'WI'],
    ['Wyoming', 'WY']
    ]
    end