Displaying 1 result from an estimated 1 matches for "userpictur".
Did you mean:
userpicture
2006 Oct 13
1
Edge rails, single table inheritance and keeping multiple classes in a single file
So is the official stance as per edge rails that multiple class
definitions must go into separate files? I was trying to use STI with
acts_as_attachment, to have all my attachment classes go into a single
file, for example:
attachment.rb
class Attachment < ActiveRecord::Base
end
class UserPicture < Attachment
belongs_to :user, :foreign_key => ''owner_id''
acts_as_attachment ...
end
but I get the error: superclass mismatch for class UserPicture
when using "model :attachment" in my controller.. This used to work
under rails 1.1.6. I found the following...