Module: Sequel::Plugins::PgArrayAssociations::ClassMethods
- Defined in:
- lib/sequel/plugins/pg_array_associations.rb
Instance Method Summary collapse
-
#many_to_pg_array(name, opts = OPTS, &block) ⇒ Object
Create a many_to_pg_array association, for the case where the associated table contains the array with foreign keys pointing to the current table.
-
#pg_array_to_many(name, opts = OPTS, &block) ⇒ Object
Create a pg_array_to_many association, for the case where the current table contains the array with foreign keys pointing to the associated table.
Instance Method Details
#many_to_pg_array(name, opts = OPTS, &block) ⇒ Object
Create a many_to_pg_array association, for the case where the associated table contains the array with foreign keys pointing to the current table. See associate for options.
286 287 288 |
# File 'lib/sequel/plugins/pg_array_associations.rb', line 286 def many_to_pg_array(name, opts=OPTS, &block) associate(:many_to_pg_array, name, opts, &block) end |
#pg_array_to_many(name, opts = OPTS, &block) ⇒ Object
Create a pg_array_to_many association, for the case where the current table contains the array with foreign keys pointing to the associated table. See associate for options.
293 294 295 |
# File 'lib/sequel/plugins/pg_array_associations.rb', line 293 def pg_array_to_many(name, opts=OPTS, &block) associate(:pg_array_to_many, name, opts, &block) end |