ransack
ransack copied to clipboard
Object-based searching.
This is a commit from our old fork, it adds regular expression support to `ransack`. Dropping it here so the contribution isn't lost. I'll try and look into making all...
… decide if they want to keep the join when using negative predicates. Fix issue where negative predicates with associated_collection does not use the correct primary key for subquery.
ransack(m: 'or', id_eq: "12", name_contains: "12").result I expect to get the following query: SELECT * FROM table WHERE table.id = 12 OR name ILIKE '%12%' but I got: SELECT *...
As MongoDB support has been dropped, the [Adapter](https://github.com/activerecord-hackery/ransack/blob/main/lib/ransack/adapters.rb) code can be simplified.
This spec or related code needs correction ```ruby Pending: (Failures listed here are expected and do not affect your suite's status) 1) Ransack::Search#build preserves (inverts) default scope and conditions for...
Rails 6 Postgres date field `:given_name_or_last_name_or_place_of_birth_or_**date_of_birth**_cont` fails. PG::UndefinedFunction: ERROR: operator does not exist: date ~~* unknown LINE 1: ...rth" ILIKE '%milna%') OR "people"."date_of_death" ILIKE NULL... ^ HINT: No operator matches...
This query simply ignores `custom_scope`. ```ruby Model.ransack({ groupings: [{custom_scope: 'bla'}]}).result.to_sql ``` Scope is defined as: ```ruby scope :custom_scope, ->(name) { ... } def self.ransackable_scopes(_auth_object = nil) [:custom_scope] end ``` Possibly...
When I search, using an alias I cannot get the value of the searched parameter in the field. In the name field I have tested and it's working fine. My...
Hi, Here's a sample project: ```ruby # has :name attribute class Property < ActiveRecord::Base has_many :product_properties def self.ransackable_attributes(auth_object = nil) ['name'] end end ``` ```ruby # has :property_id attribute class...
## Version * ransack: 2.4.2 * Rails: 5.2.6 * Ruby: 2.6.7 ## Source code ### Model app/model/user.rb ``` class User < ApplicationRecord has_one :invitation, dependent: :destroy has_many :invitees, through: :invitation...