Module: Sequel::Plugins::PreparedStatementsAssociations::ClassMethods
- Defined in:
- lib/sequel/plugins/prepared_statements_associations.rb
Instance Method Summary collapse
-
#associate(type, name, opts = OPTS, &block) ⇒ Object
Disable prepared statement use if a block is given, or the :dataset or :conditions options are used, or you are cloning an association.
Instance Method Details
#associate(type, name, opts = OPTS, &block) ⇒ Object
Disable prepared statement use if a block is given, or the :dataset or :conditions options are used, or you are cloning an association.
28 29 30 31 32 33 |
# File 'lib/sequel/plugins/prepared_statements_associations.rb', line 28 def associate(type, name, opts = OPTS, &block) if block || opts[:dataset] || (opts[:clone] && association_reflection(opts[:clone])[:prepared_statement] == false) opts = opts.merge(:prepared_statement=>false) end super(type, name, opts, &block) end |