2014-09-08 17:49:31 -04:00
|
|
|
|
# Change Log
|
2014-09-23 08:23:25 -04:00
|
|
|
|
This change log was started in August 2014. All notable changes to this project
|
|
|
|
|
henceforth should be documented here.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-10-26 18:22:41 -04:00
|
|
|
|
## Version 1.5.0 - 2014-10-26
|
2014-09-23 10:12:01 -04:00
|
|
|
|
### Added
|
|
|
|
|
|
2014-10-15 15:14:22 -04:00
|
|
|
|
* Add support for multiple sort fields and default orders in Ransack
|
|
|
|
|
`sort_link` helpers
|
2014-10-03 13:29:09 -04:00
|
|
|
|
([pull request](https://github.com/activerecord-hackery/ransack/pull/438)).
|
2014-10-15 15:14:22 -04:00
|
|
|
|
|
2014-10-03 13:25:09 -04:00
|
|
|
|
*Caleb Land*, *James u007*
|
|
|
|
|
|
2014-10-26 18:22:41 -04:00
|
|
|
|
* Add tests for `lteq`, `lt`, `gteq` and `gt` predicates. They are also
|
|
|
|
|
tested in Arel, but testing them in Ransack has proven useful to detect
|
|
|
|
|
issues.
|
2014-10-13 14:19:51 -04:00
|
|
|
|
|
2014-10-26 18:22:41 -04:00
|
|
|
|
*Jon Atack*
|
|
|
|
|
|
|
|
|
|
* Add tests for unknown attribute names.
|
|
|
|
|
|
|
|
|
|
*Joe Yates*
|
|
|
|
|
|
|
|
|
|
* Add tests for attribute names containing '_or_' and '_and_'.
|
|
|
|
|
|
|
|
|
|
*Joe Yates*, *Jon Atack*
|
|
|
|
|
|
|
|
|
|
* Add tests for attribute names ending with '_start' and '_end'.
|
|
|
|
|
|
|
|
|
|
*Jon Atack*, *Timo Schilling*
|
|
|
|
|
|
|
|
|
|
* Add tests for `start`, `not_start`, `end` and `not_end` predicates, with
|
|
|
|
|
emphasis on cases when attribute names end with `_start` and `_end`.
|
2014-10-25 03:16:20 -04:00
|
|
|
|
|
2014-10-13 14:19:51 -04:00
|
|
|
|
*Jon Atack*
|
|
|
|
|
|
2014-09-23 10:12:01 -04:00
|
|
|
|
### Fixed
|
|
|
|
|
|
2014-10-15 15:14:22 -04:00
|
|
|
|
* Fix a regression where form labels for attributes through a `belongs_to`
|
|
|
|
|
association without a translation for the attribute in the locales file
|
|
|
|
|
would cause a "no implicit conversion of nil into Hash" crash instead of
|
|
|
|
|
falling back on the attribute name. Added test coverage.
|
|
|
|
|
|
|
|
|
|
*John Dell*, *Jon Atack*, *jasdeepgosal*
|
|
|
|
|
|
|
|
|
|
* Fix the `form_helper date_select` spec that was failing with Rails 4.2 and
|
2014-10-13 14:19:51 -04:00
|
|
|
|
master.
|
2014-10-12 08:35:19 -04:00
|
|
|
|
|
|
|
|
|
*Jon Atack*
|
|
|
|
|
|
2014-10-25 03:16:20 -04:00
|
|
|
|
* Improve `attribute_method?` parsing for method names containing `_and_` and
|
|
|
|
|
`_or_`. Attributes named like `foo_and_bar` or `foo_or_bar` are recognized
|
|
|
|
|
now instead of running failing checks for `foo` and `bar`.
|
2014-10-17 13:24:57 -04:00
|
|
|
|
|
2014-10-26 18:22:41 -04:00
|
|
|
|
*Joe Yates*
|
2014-10-17 13:24:57 -04:00
|
|
|
|
|
2014-10-25 03:16:20 -04:00
|
|
|
|
* Improve `attribute_method?` parsing for method names ending with a
|
|
|
|
|
predicate like `_start` and `_end`. For instance, a `life_start` attribute
|
|
|
|
|
is now recognized instead of raising a NoMethodError.
|
2014-10-24 05:28:28 -04:00
|
|
|
|
|
|
|
|
|
*Timo Schilling*, *Jon Atack*
|
|
|
|
|
|
2014-09-23 10:12:01 -04:00
|
|
|
|
### Changed
|
|
|
|
|
|
2014-10-04 13:37:13 -04:00
|
|
|
|
* Reduce object allocations and memory footprint (with a slight speed gain as
|
|
|
|
|
well) by extracting commonly used strings into top level constants and
|
|
|
|
|
replacing calls to `#try` methods with simple nil checking.
|
|
|
|
|
|
|
|
|
|
*Jon Atack*
|
|
|
|
|
|
2014-10-03 13:29:09 -04:00
|
|
|
|
|
2014-09-23 10:12:01 -04:00
|
|
|
|
## Version 1.4.1 - 2014-09-23
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
|
|
* Fix README markdown so RubyGems documentation picks up the formatting correctly.
|
|
|
|
|
|
|
|
|
|
*Jon Atack*
|
|
|
|
|
|
2014-10-03 13:29:09 -04:00
|
|
|
|
|
2014-09-23 08:23:25 -04:00
|
|
|
|
## Version 1.4.0 - 2014-09-23
|
2014-09-08 17:49:31 -04:00
|
|
|
|
### Added
|
|
|
|
|
|
2014-09-23 08:23:25 -04:00
|
|
|
|
* Add support for Rails 4.2.0! Let us know if you encounter any issues.
|
2014-09-13 15:56:47 -04:00
|
|
|
|
|
2014-09-23 08:23:25 -04:00
|
|
|
|
*Xiang Li*
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-09-13 15:56:47 -04:00
|
|
|
|
* Add `not_true` and `not_false` predicates and update the "Basic Searching"
|
|
|
|
|
wiki. Fixes #123, #353.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
|
|
|
|
*Pedro Chambino*
|
|
|
|
|
|
2014-09-23 08:23:25 -04:00
|
|
|
|
* Add `ro.yml` Romanian translation file.
|
|
|
|
|
|
|
|
|
|
*Andreas Philippi*
|
|
|
|
|
|
2014-09-08 18:22:18 -04:00
|
|
|
|
* Add new documentation in the README explaining how to group queries by `OR`
|
|
|
|
|
instead of the default `AND` using the `m: 'or'` combinator.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-09-23 08:23:25 -04:00
|
|
|
|
* Add new documentation in the README and in the source code comments
|
|
|
|
|
explaining in detail how to handle whitelisting/authorization of
|
|
|
|
|
attributes, associations, sorts and scopes.
|
|
|
|
|
|
|
|
|
|
* Add new documentation in the README explaining in more detail how to use
|
|
|
|
|
scopes for searching with Ransack.
|
|
|
|
|
|
|
|
|
|
* Begin a CHANGELOG.
|
|
|
|
|
|
2014-09-08 17:49:31 -04:00
|
|
|
|
*Jon Atack*
|
|
|
|
|
|
2014-09-13 15:56:47 -04:00
|
|
|
|
### Fixed
|
2014-09-08 18:22:18 -04:00
|
|
|
|
|
2014-09-23 08:23:25 -04:00
|
|
|
|
* Fix singular/plural Active Record attribute translations.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-09-13 15:56:47 -04:00
|
|
|
|
*Andreas Philippi*
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-09-08 18:22:18 -04:00
|
|
|
|
* Fix the params hash being modified by `Search.new` and the Ransack scope.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
|
|
|
|
*Daniel Rikowski*
|
|
|
|
|
|
2014-09-23 08:23:25 -04:00
|
|
|
|
* Apply default scope conditions for association joins (fix for Rails 3).
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
|
|
|
|
Avoid selecting records from joins that would normally be filtered out
|
|
|
|
|
if they were selected from the base table. Only applies to Rails 3, as
|
|
|
|
|
this issue was fixed in Rails 4.
|
|
|
|
|
|
|
|
|
|
*Andrew Vit*
|
|
|
|
|
|
2014-09-23 08:23:25 -04:00
|
|
|
|
* Fix incoherent code examples in the README Associations section that
|
|
|
|
|
sometimes used `@q` and other times `@search`.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
|
|
|
|
*Jon Atack*
|
|
|
|
|
|
2014-09-13 15:56:47 -04:00
|
|
|
|
### Changed
|
|
|
|
|
|
|
|
|
|
* Refactor Ransack::Translate.
|
|
|
|
|
|
2014-09-23 08:23:25 -04:00
|
|
|
|
* Rewrite much of the Ransack README documentation, including the
|
|
|
|
|
Associations section code examples and the Authorizations section detailing
|
|
|
|
|
how to whitelist attributes, associations, sorts and scopes.
|
2014-09-13 15:56:47 -04:00
|
|
|
|
|
|
|
|
|
*Jon Atack*
|
|
|
|
|
|
2014-09-08 17:49:31 -04:00
|
|
|
|
## Version 1.3.0 - 2014-08-23
|
|
|
|
|
### Added
|
|
|
|
|
|
2014-09-08 18:22:18 -04:00
|
|
|
|
* Add search scopes by popular demand. Using `ransackable_scopes`, users can
|
|
|
|
|
define whitelists for allowed model scopes on a parent table. Not yet
|
|
|
|
|
implemented for associated models' scopes; scopes must be defined on the
|
|
|
|
|
parent table.
|
|
|
|
|
|
|
|
|
|
*Gleb Mazovetskiy*, *Andrew Vit*, *Sven Schwyn*
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-09-08 18:22:18 -04:00
|
|
|
|
* Add `JOINS` merging.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-09-08 18:22:18 -04:00
|
|
|
|
* Add `OR` grouping on base search.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-09-08 18:22:18 -04:00
|
|
|
|
* Allow authorizing/whitelisting attributes, associations, sorts and scopes.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-09-08 18:22:18 -04:00
|
|
|
|
* Improve boolean predicates’ handling of `false` values.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
|
|
|
|
* Allow configuring Ransack to raise on instead of ignore unknown search
|
|
|
|
|
conditions.
|
|
|
|
|
|
|
|
|
|
* Allow passing blank values to search without crashing.
|
|
|
|
|
|
2014-09-08 18:22:18 -04:00
|
|
|
|
* Add wildcard escaping compatibility for SQL Server databases.
|
2014-09-08 17:49:31 -04:00
|
|
|
|
|
2014-09-08 18:22:18 -04:00
|
|
|
|
* Add various I18n translations.
|