OMG, you're right! Couldnt see the forest for the trees. Thx, Fred! This didnt show up in any lists I looked at for MagicReservedwords and such... I might have to find time to walk thru the rils code to see what other names could clash w method names.
thx again On Nov 30, 3:55 pm, Frederick Cheung <[email protected]> wrote: > On Nov 30, 11:48 pm, lunaclaire <[email protected]> wrote: > > > sorry... we added to the original migration so that now the attr's are > > > t.integer :update_request_id > > t.integer :change_type > > t.integer :assoc_obj_id > > t.string :field_changed > > t.string :new_value > > t.integer :resolution > > field_changed is the one (the fact that the error message is talking > about field_changed is a hint in that direction > > Fred > > > t.timestamps > > > On Nov 30, 2:27 pm, lunaclaire <[email protected]> wrote: > > > > from the migration that created the table: > > > > create_table :updates do |t| > > > t.integer :update_request_id > > > t.integer :change_type > > > t.integer :assoc_obj_id > > > t.string :field_changed > > > t.string :new_value > > > > t.timestamps > > > end > > > > anything pop out there? I did try to name these attribs to avoid a > > > clash, but perhaps I missed something? > > > > On Nov 30, 2:17 pm, Frederick Cheung <[email protected]> > > > wrote: > > > > > On Nov 30, 9:02 pm, lunaclaire <[email protected]> wrote: > > > > > > I have a new model I've just built. It's associated with another model > > > > > via has_many. I'm trying to create one of these obj's for the first > > > > > time and I keep getting an Argument Error as follows: > > > > > > ArgumentError (wrong number of arguments (3 for 0)): > > > > > C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/ > > > > > active_record/dirty.rb:135:in `field_changed?' > > > > > > this happens when I try to create the obj, but it's deep in the rails > > > > > codebase and I cant figure out why it's happening. > > > > > What columns / associations/ methods does your model have ? I'd guess > > > > that one of these is accidentally overriding a core activerecord > > > > method. > > > > > Fred > > > > > > I've tried both creating the object as part of the association like > > > > > this: > > > > > > self.updates.create() > > > > > > and directly like this: > > > > > > update = Update.create() or update = Update.new() > > > > > > with and without values passed in as a hash and get the same results > > > > > every time. > > > > > > has anyone else seen this? > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

