lib/pg_search/features/feature.rb in pg_search-1.0.3 vs lib/pg_search/features/feature.rb in pg_search-1.0.4

- old
+ new

@@ -1,14 +1,19 @@ require "active_support/core_ext/module/delegation" +require "active_support/core_ext/hash/keys" module PgSearch module Features class Feature + def self.valid_options + [:only, :sort_only] + end + delegate :connection, :quoted_table_name, :to => :'@model' def initialize(query, options, all_columns, model, normalizer) @query = query - @options = options || {} + @options = (options || {}).assert_valid_keys(self.class.valid_options) @all_columns = all_columns @model = model @normalizer = normalizer end