README.md in rooble-0.4.4 vs README.md in rooble-0.4.5

- old
+ new

@@ -92,27 +92,28 @@ ## Search The search method will lookup for keyword matches within columns or records that match a given id, this means that you can essentially use it only to search in text fields or in the primary key. So for instance if you try to search against numeric columns it won't work but for that type of specific search you are better off using ActiveRecord directly. The rational behind this is that most application _open_ searches will lookup for id's, names or codes, rarely against numeric values. ``` ruby -Model.search(fields, search_term, options={}, order_by: {id: :asc}) +Model.search(fields, search_term, **options) ``` **Arguments:** - `fields` a string with a field name or string/symbol array with field names to make the query against - `search_term` string with the term to search - - `order_by` how records will be ordered, defaults to the ID in Ascending order - `options` a hash with a set of options. Please se below for more info. `Model.search("name", "John")` will look for records which have **John** within the `name` attribute. There is an extra options hash that you can pass to this method, the options are: * `case_sensitive: false` whether you want to make the search case sensitive. Default is false. Note that this relies on the database engine defaults so if the column or table schema is set to be case insensitive it won't mater what you set here. * `include` an array/hash of symbols if you want to include other relations on the model. Same as with default rails include. * `join` an array/hash of symbols if you want to join other relations on the model. Same as with default rails join. * `id_fields: nil` an array of strings with id fields that should be considered on the search. This is important because we cannot do `LIKE` searches on integer fields so if you want to search both for text fields and in ID fields this should be set + * `partial_search` a boolean indicating if you want to do a pattern search. This is the same as just passing "%search_term%" as the search term. + * `order_by` a hash with a key/value on how records will be ordered, defaults to the ID in Ascending order (e.g. {id: :asc}). **Examples** Simple search for a specific state: