search for: createarticlesandauthorst

Displaying 1 result from an estimated 1 matches for "createarticlesandauthorst".

2010 Jun 29
3
belongs_to. Association methods don't pass data to DB
Hi. I have a problem with the association methods which passed to a model through a belongs_to declaration. Here''s an illustration of the issue: GIVEN: # migration class CreateArticlesAndAuthorsTables < ActiveRecord::Migration   def self.up     create_table :articles do |t|       t.text     :title       t.integer :author_id     end     create_table :authors do |t|       t.text :name     end   end   def self.down     drop_table :articles     drop_table :authors   end end # articles mod...