I'm trying to develop a many-to-many relationship between tags (in the tags
table) and items (in the items
table) using a field of type integer[]
on each item.
I know that Rails 4 (and Rails 3 via postgres_ext) has support for Postgres' arrays feature through the :array => true
parameter, but I can't figure out how to combine them with Active Record associations.
Does has_many
have an option for this? Is there a gem for this? Should I give up and just create a has_many :through
relationship (though with the amount of relations I'm expecting this is probably unmanageable)?