All pastes #68430 Raw Edit

Stuff

public text v1 · immutable
#68430 ·published 2006-06-21 16:42 UTC
rendered paste body
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1789:in `method_missing': undefined method `fips_number=' for #<State:0xb7a2f6f8> (NoMethodError)
        from ./translator.rb:147
        from ./translator.rb:145
        from ./translator.rb:141

From the code:

    141 states.each { | abbreviation, fullname |
    142             state = State.new
    143             state.abbreviation = abbreviation
    144             state.name = fullname
    145             states_numbers.each { | stateabbr, number |
    146                 if abbreviation = stateabbr
    147                     state.fips_number = number
    148                 end
    149             }
    150             state.save
    151 }

Where the state table is defined as: 
create table states ( id serial primary key, abbreviation varchar(2), name varchar(120), fips_number int(2) )