Add optional block argument for the
sort_linkmethod. PR #604.
Andrea Dal Ponte
ransack_aliasto allow users to customize the names for long ransack field names. PR #623.
Josh Hunter, Jon Atack
✅ Add test for
ActionController:Parameterobject params in
sort_linkto ensure Ransack is handling the Rails 5 changes correctly. Commit b1cfed8.
Add i18n locale files:
params#to_unsafe_honly if Rails 5, and add tests. Commit 14e66ca.
Respect negative conditions for collection associations and fix Mongoid compat. PR #645.
Ensure conditions differing only by ransacker_args aren't filtered out. PR #665.
Fix using aliased attributes in association searches, and add a failing spec. PR #602.
✅ Fix test
#sort_link with hide order indicator set to trueto fail properly (4f65b09). This spec, added in #473, tested the presence of the attribute name instead of the absence of the order indicators and did not fail when it should.
Josh Hunter, Jon Atack
✅ Fix rspec-mocks
stubdeprecation warnings when running the tests. Commit 600892e.
Fix invalid Chinese I18n locale file name by replacing "zh" with "zh-CN". PR #590.
_wildcard characters with PostgreSQL and MySQL. PR #584.
Ransack::Adaptersfrom conditionals to classes (94a404c).
👍 Add Mongoid support for referenced/embedded relations. PR #498. TODO: Missing spec coverage! Add documentation!
Add German i18n locale file (
de.yml). PR #537.
Fix #499 and #549. Ransack now loads only Active Record if both Active Record and Mongoid are running to avoid the two adapters overriding each other. This clarifies that Ransack currently knows how to work with only one database adapter active at a time. PR #541.
ASnow (Большов Андрей)
attribute_method?parsing for attribute names containing
_or_. Attributes named like
foo_or_barare recognized now instead of running failing checks for
bar. PR #562.
✅ Fix a time-dependent test failure. When the database has
default_timezone = :local(system time) and the
Time.zoneis set to elsewhere, then
Date.currentdoes not match what the query produces for the stored timestamps. Resolved by setting everything to UTC. PR #561.
0️⃣ Avoid overwriting association conditions with default scope in Rails 3. When a model with default scope was associated with conditions (
has_many :x, conditions: ...), the default scope would overwrite the association conditions. This patch ensures that both sources of conditions are applied. 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 since Rails 4. PR #560.
🗄 Fix RSpec
itsmethod deprecation warning: "Use of rspec-core's its method is deprecated. Use the rspec-its gem instead" (c09aa17).
🗄 Fix deprecated RSpec syntax in
⬆️ Upgrade gemspec dependencies: MySQL2 from '0.3.14' to '0.3.18', and RSpec from '~> 2.14.0' to '~> 2' which loads 2.99 (000cd22).
📚 Various documentation updates.
💎 Add the Ruby version to the the header message that shows the database, Active Record and Arel versions when running tests.
Add Code Climate analysis.
An improved fix for the "undefined method
model_namefor Ransack::Search" issue #518 affecting Rails 4.2.1 and 5.0.0. This fix allows us to remove the ActionView patch in Ransack version 1.6.4.
Fix an erroneous reference in
ActiveRecord::Associations::JoinDependencyto a version-dependent Active Record reference, and replace it with a better, more reliable one defined in Polyamorous. As this class lives inside an
ActiveRecordmodule, the reference needs to be absolute in order to properly point to the AR class.
Nahuel Cuesta Luengo
💎 Fix RubyGems YARD rendering of the README docs.
⬆️ Upgrade Polyamorous dependency to version 1.2.0, which uses
alias_methodfor hooking into Active Record (with Ruby 2.x).
🚧 [WIP/experimental] Add compatibility with Rails 5/master and Arel 7.
⚡️ Update the [Contributing Guide](CONTRIBUTING.md) with detailed steps for contributing to Ransack.
✅ Broaden the test suite database options in
schema.rband add code documentation.
✅ Improve the header message when running tests.
:wants_arrayto be set to
falsein the predicate options (#32).
Add a failing spec for issue #374.
Jamie Davidson, Jon Atack
🗄 Stop relying on
Active Record::relation#where_valueswhich are deprecated in Rails 5.
✅ Make the test for passing search arguments to a ransacker (
ransacker_args) work correctly with Sqlite3.
👷 Stop CI testing for Rails 3.0 to reduce the size of the Travis test matrix.
Fix a regression (#496) caused by ee571fe where passing a multi-parameter attribute (like
RuntimeError: can't add a new key into hash during iteration, and add a regression spec for the issue.
Nate Berkopec, Jon Atack
⚡️ Update travis-ci to no longer test Rails 3.1 with Ruby 2.2 and speed up the test matrix.
🔨 Refactor Nodes::Condition.
👍 Add support for using Ransack with
Mongoid 4.0without associations (PR #407).
✅ Add support and tests for passing stringy booleans for ransackable scopes (PR #460).
Add an sort_link option to not display sort order indicator arrows (PR #473).
📚 Numerous documentation improvements to the README, Contributing Guide and wiki.
:asoption respect the custom search key if it has been set (PR #470). Prior to this change, if you set a custom
search_keyoption in the Ransack initializer file, you'd have to also pass an
as: :whateveroption to all of the search forms. Fixes #92.
Fix sorting on polymorphic associations (missing downcase) (PR #467).
🚅 Fix Rails 5 / Arel 5 compatibility after the Arel and Active Record API changed.
🔗 Fix and add tests for sort_link
default_orderparsing if the option is set as a string instead of symbol.
✅ Fix and add a test to handle
nilin options passed to sort_link.
Fix #search method name conflicts in the README.
🔨 Refactor and DRY up FormHelper#SortLink. Encapsulate parsing into a Plain Old Ruby Object with few public methods and small, private functional methods. Limit mutations to explicit methods and mutate no ivars.
💎 Numerous speed improvements by using more specific Ruby methods like:
string#freezeinstances with top level constants to reduce string allocations in Ruby < 2.1.
🚚 Remove unneeded
Ransack::namespacing on most of the constants.
In enumerable methods, pass a symbol as an argument instead of a block.
⚡️ Update Travis-ci for Rails 5.0.0 and 4-2-stable.
⚡️ Update the Travis-ci tests and the Gemfile for Ruby 2.2.
#ransackclass methods in the README and wiki code examples. Enabling the
#searchalias by default may possibly be deprecated in the next major release (Ransack v.2.0.0) to address #369.
Add base specs for search on fields with
Add a failing spec for detecting attribute fields containing
_and_that needs to be fixed. Attribute names containing
_or_are still not parsed/detected correctly.
Fix a regression caused by incorrect string constants in
🚚 Remove duplicate code in