I recently run into a problem where records were marked as readonly. Checking out the documentation I found this:
"Records loaded through joins with piggy-back attributes will be marked as read only since they cannot be saved. "
Why not? My model looks like the following:
class MailAccount
belongs_to :account, :class_name => "UserAccount"
named_scope :active, :joins => :account,
:conditions => "user_accounts.archived_at IS NULL"
end
I find no reason why models loaded retrieved with this named scope can not be saved. Any ideas?