has_many_polymorphs
has_many_polymorphs copied to clipboard
An ActiveRecord plugin for self-referential and double-sided polymorphic associations.
I stumbled upon a situation where join model would get inserted two records whenever has_many_polymorphs was used. Here is the scenario class Item < ActiveRecord::Base after_create :add_info has_many_polymorphs :describables, :from...
here's what I see in the console in production: Loading production environment (Rails 2.3.11) /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/base.rb:1998:in `method_missing':NoMethodError: undefined method`has_many_polymorphs' for #Class:0xd11d480 but in development mode, no problems. Why would there be...
I've been creating a rails project using has_many_polymorphs to create associations between models. Some of these models store data in columns directly related to keys in incoming/outgoing plists. This has...
Is it possible to specify conditions to essentially create different name spaces for tags when using the taggin_extensions? For instance, Widgets can be tagged but Widgets belong to a Company...
I'm trying to define multiple polymorphic relations (`has_many_polymorphs plugin`) from a single parent to same children. Note has many viewers Note has many editors Viewers could be either Users or...
I was hoping somebody might point me in the right direction. I have a class Ad that has a number of different placements on a website. It has_many_polymorphs :placements, :from...
In ActiveRecord's accepts_nested_attributes_for, it uses a case statement on the reflection macro to determine the association type, and predictably, it doesn't include :has_many_polymorphs, which results in a call to a...
The runtime performance of hmp is killing me in development mode. How can we make this better? Code generation maybe? I'm willing to help build it.
I am using ACL ( http://github.com/rurounijones/acl9/tree/master ) for access control and combining it with has_many_polymorphs for easy associations. It is working great with one problem. ACL9 allows you to assign...
I have the following situation: class Housing::Kennel < ActiveRecord::Base has_many_polymorphs :guests, :from => [:dogs,:cats,_birds] end class GuestKennel < ActiveRecord::Base belongs_to :kennel belongs_to :guest, :polymorphic => true end class Pets::Dog <...