I have two classes: Article and Update. When I try to update an
Article, it is NOT saving the instance, but is only saving the
associated Update object (which is valid).
class Article < ActiveRecord::Base
has_one :update, :as => :content, :dependent => :destroy
class Update < ActiveRecord::Base
belongs_to :content, :polymorphic => true, :readonly => true
class ArticlesController < ApplicationController
@article = Article.find(params[:id])
flash[:notice] = 'Article was successfully updated.'
render :action => 'edit'
When I check my log; however, you can see that only the Update object
was updated, not the Article object. Any thoughts on why? I haven't
done much with Rails 2.2, but this is not the behavior I remember from