Hey Everyone.

Last year I implemented array association on my GEM exclusively for 

I'm planning to push this feature to Active Record, so any database that 
supports array could use.

The main steps that I took was:
1. Allow `array` setting for `has_many`
2. Identify array associations with something like 
3. Create a generic method that infers the correct way to connect both keys 
(primary_key and foreign_key), instead of direct use of 
4. Allow `cast` to be called on Some Arel Nodes
5. Make sure that `AssociationScope` rely on the above generic method to 
build the condition
6. Create the correct `BindParam` for each value on an array association
7. Create the necessary `BelongsToManyReflection`, 
`BelongsToManyAssociation`, and `Builder::BelongsToMany`
8. Adjust `AutosaveAssociation` to behave properly against array 
9. A couple of other minors adjusts to make it seamless to other 

The only problem so far is that it doesn't work with Polymorphic, but, it's 
so far a big win, especially for systems with `tags` and `conversations` 
(with multiple users).

I was thinking about pushing it to Rails not only because it's a cool and 
handy feature, but also because one of the problems that I faced recently 
with the GEM, where the `eq` condition is hardcoded, and that annoys me 
since it could open a door for many other customized associations. Here are 
the commit and line that got me thinking about this:

I want to hear people's opinions. And, if I decided to move forward, I'll 
do one step at a time, probably starting by the generic method on step #3.

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to