Project

General

Profile

« Previous | Next » 

Revision f4459c11

Added by David Davis about 8 years ago

Refs #3809 - Turning on some rubocop cops

View differences:

app/models/concerns/scoped_search_extensions.rb
end
def cast_facts(table, key, operator, value)
is_int = (value =~ /\A[-+]?\d+\z/ ) || (value.is_a?(Integer))
is_int = (value =~ /\A[-+]?\d+\z/) || (value.is_a?(Integer))
is_pg = ActiveRecord::Base.connection.adapter_name.downcase.starts_with? 'postgresql'
# Once Postgresql 8 support is removed (used in CentOS 6), this could be replaced to only keep the first form (working well with PG 9)
if (is_int && !is_pg)

Also available in: Unified diff