Module: PGCrypto::ClassMethods

Defined in:
lib/pgcrypto_ransack.rb

Instance Method Summary collapse

Instance Method Details

#old_pgcryptoObject



5
# File 'lib/pgcrypto_ransack.rb', line 5

alias_method :old_pgcrypto, :pgcrypto

#pgcrypto(*args) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/pgcrypto_ransack.rb', line 7

def pgcrypto(*args)
  column_names = args.dup
  column_names.pop if column_names.last.is_a?(Hash)
  column_names.each do |column_name|
    ransacker column_name do
      arel_table[column_name]
    end
  end
  old_pgcrypto(*args)
end