Skip to content

Commit

Permalink
Merge pull request #519 from sineed/ransacker-arguments-changelog
Browse files Browse the repository at this point in the history
Update CHANGELOG [ci skip]
  • Loading branch information
jonatack committed Mar 15, 2015
2 parents 51229fe + c90fb5c commit c2b316c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Master (unreleased)

* Add ransacker arguments
([#513](https://github.com/activerecord-hackery/ransack/pull/513))

*Denis Tataurov*, *Jon Atack*

## Version 1.6.3 - 2015-01-21

Expand Down
3 changes: 2 additions & 1 deletion spec/support/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ class Person < ActiveRecord::Base
ransacker :with_passed_arguments, args: [:parent, :ransacker_args] do |parent, args|
min_body, max_body = args
sql = <<-SQL
(SELECT title
(SELECT MAX(articles.title)
FROM articles
WHERE articles.person_id = people.id
AND CHAR_LENGTH(articles.body) BETWEEN #{min_body} AND #{max_body}
GROUP BY articles.person_id
)
SQL
Arel.sql(sql.squish)
Expand Down

0 comments on commit c2b316c

Please sign in to comment.