petehamilton / citier

CITIER (Class Inheritance & Table Inheritance Embeddings for Rails) is a solution for simple Multiple Class Inheritance in Rails.
88 stars 24 forks source link

Allows children to be directly added to parent's belongs_to #16

Closed morgz closed 13 years ago

morgz commented 13 years ago

Addresses this problem:

Site.first.products << Book.first

Where

Site :has_many :products

Product :belongs_to :site

And

class Book < Product acts_as_citier

Throws an error:

ArgumentError: wrong number of arguments (1 for 0) from /Users/danmorgz/.rvm/gems/ruby-1.9.2-p0@rails3/gems/citier-0.1.12/lib/citier/child_instance_methods.rb:3:in save' from /Users/danmorgz/.rvm/gems/ruby-1.9.2-p0@rails3/gems/activerecord-3.0.9/lib/active_record/associations/has_many_association.rb:66:ininsert_record'

morgz commented 13 years ago

Just making a few changes before this is ready

petehamilton commented 13 years ago

Thanks, just make the request again when you're all set, should have some time to work on this at the weekend so will try and resolve some issues.