lib/torque/postgresql/relation.rb in torque-postgresql-0.2.6 vs lib/torque/postgresql/relation.rb in torque-postgresql-0.2.7

- old
+ new

@@ -12,19 +12,13 @@ include DistinctOn include AuxiliaryStatement include Inheritance SINGLE_VALUE_METHODS = [:itself_only] - MULTI_VALUE_METHODS = [:distinct_on, :auxiliary_statements, :cast_records, - :dynamic_selection] + MULTI_VALUE_METHODS = [:distinct_on, :auxiliary_statements, :cast_records] VALUE_METHODS = SINGLE_VALUE_METHODS + MULTI_VALUE_METHODS - # :nodoc: - def dynamic_selection_values; get_value(:dynamic_selection); end - # :nodoc: - def dynamic_selection_values=(value); set_value(:dynamic_selection, value); end - # Resolve column name when calculating models, allowing the column name to # be more complex while keeping the query selection quality def calculate(operation, column_name) column_name = resolve_column(column_name).first if column_name.is_a?(Hash) super(operation, column_name) @@ -129,10 +123,10 @@ ActiveRecord::Relation::SINGLE_VALUE_METHODS += Relation::SINGLE_VALUE_METHODS ActiveRecord::Relation::MULTI_VALUE_METHODS += Relation::MULTI_VALUE_METHODS ActiveRecord::Relation::VALUE_METHODS += Relation::VALUE_METHODS ActiveRecord::QueryMethods::VALID_UNSCOPING_VALUES += [:cast_records, :itself_only, - :distinct_on, :auxiliary_statements, :dynamic_selection] + :distinct_on, :auxiliary_statements] if ActiveRecord::QueryMethods.const_defined?('DEFAULT_VALUES') Relation::SINGLE_VALUE_METHODS.each do |value| ActiveRecord::QueryMethods::DEFAULT_VALUES[value] = nil \ if ActiveRecord::QueryMethods::DEFAULT_VALUES[value].nil?