Displaying 1 result from an estimated 1 matches for "001_create_states".
2008 Apr 10
3
option_groups_from_collection_for_select with a ActiveRecord::Base single object
...ada.
It has the following:
====new.html.erb====
<%= select_tag(
:state,
option_groups_from_collection_for_select(
State.countries,
:country,
:country,
"id",
"id")) %>
=================
I have a migration with all the states/provinces I need.
==== 001_create_states.rb====
class CreateStates < ActiveRecord::Migration
def self.up
create_table :states do |t|
t.string :name
t.string :postal
t.string :country
t.timestamps
end
State.create :name => ''Alabama'', :postal => ''AL'', :countr...