Sha256: 07fb0314178ccdc7553ccaf2662981cc5044d3d290a36caeaea520e417ebd68b

Contents?: true

Size: 157 Bytes

Versions: 6

Compression:

Stored size: 157 Bytes

Contents

module RailsAutocomplete
  module ActiveRecordExtension
    def autocomplete attr, query
      where("LOWER(#{attr}) LIKE ?", "%#{query}%")
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_autocomplete-0.1.0 lib/rails_autocomplete/active_record_extension.rb
rails_autocomplete-0.0.6 lib/rails_autocomplete/active_record_extension.rb
rails_autocomplete-0.0.5 lib/rails_autocomplete/active_record_extension.rb
rails_autocomplete-0.0.4 lib/rails_autocomplete/active_record_extension.rb
rails_autocomplete-0.0.3 lib/rails_autocomplete/active_record_extension.rb
rails_autocomplete-0.0.2 lib/rails_autocomplete/active_record_extension.rb