I'm a rails noob.
That said, I've been doing not too bad but am stumbling over a basic
problem, probably a naming issue. Here's the steup:
class GeneralModType < ActiveRecord::Base
class GeneralMod < ActiveRecord::Base
class CreateGeneralMods < ActiveRecord::Migration
create_table :general_mods do |t|
t.integer :general_mod_type_id, :rangebonus, :damagebonus, :srdamagebonus, :reloadbonus, :accbonus
Now, from all the research I am frantically doing, this seems like it
should work, but it doesn't. I go into the console, find the first
GeneralMod, then do:
mod.GeneralModType = GeneralModType.new
mod.GeneralaModType.name = "blah"
I get a saved mod type, but general_mod_type_id is still nil. I've got
another relationship in another two classes that's working fine, so
I'm guessing I'm just screwing up something basic here. This is a
little higher level than I am used to, being a PHP schlub.