Andrew Vit
f37966b392
Apply default scope conditions for association joins
...
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.
2014-09-03 02:24:51 -07:00
Sven Schwyn
72dd5d12d5
Use model scopes with Ransack (coded by @avit and @glebm).
2014-06-22 11:36:35 +02:00
Jon Atack
1abf8f6086
Maintain Ruby 1.8.7 syntax compatibility
...
since Rails 3.x stills supports Ruby 1.8.7 as per
http://guides.rubyonrails.org/v3.2.17/getting_started.html :
“Ruby language version 1.8.7 or higher.”
2014-05-01 15:55:39 +02:00
Washington Luiz
b4973315e9
Merge branch 'master' into bring-rails-3
...
Conflicts:
.travis.yml
Gemfile
README.md
lib/ransack/adapters/active_record/3.0/context.rb
lib/ransack/adapters/active_record/3.1/context.rb
lib/ransack/adapters/active_record/3.2/context.rb
lib/ransack/adapters/active_record/base.rb
lib/ransack/adapters/active_record/context.rb
lib/ransack/constants.rb
lib/ransack/context.rb
lib/ransack/helpers/form_builder.rb
lib/ransack/helpers/form_helper.rb
lib/ransack/nodes/attribute.rb
lib/ransack/nodes/condition.rb
lib/ransack/nodes/grouping.rb
lib/ransack/nodes/sort.rb
lib/ransack/predicate.rb
lib/ransack/translate.rb
ransack.gemspec
spec/blueprints/people.rb
spec/ransack/adapters/active_record/base_spec.rb
spec/ransack/adapters/active_record/context_spec.rb
spec/ransack/configuration_spec.rb
spec/ransack/dependencies_spec.rb
spec/ransack/helpers/form_builder_spec.rb
spec/ransack/helpers/form_helper_spec.rb
spec/ransack/predicate_spec.rb
spec/ransack/search_spec.rb
spec/ransack/translate_spec.rb
spec/support/schema.rb
2014-04-10 00:28:29 -03:00
jonatack
8abd7fdd80
Fixes issue #273 - translations for namespaced models.
...
ActiveRecord uses i18n_key methods which return
"namespace/model_name"("namespace.model_name" in rails 3.0.x) for
Namespace::ModelName. Ransack should used the same pattern.
Adapted from original commit by github.com/Bonias
2014-01-01 18:53:51 +01:00
Jon Atack
82cedfca52
Merge pull request #275 from Bonias/fix-attributes-translations-for-namespaced-models
...
Fixes issue #273 - translations for namespaced models
2014-01-01 09:41:25 -08:00
jonatack
8df62abfba
Code cleanup
2013-12-10 19:18:17 +01:00
jonatack
7d452627dd
Code cleanup
2013-12-10 10:52:46 +01:00
jonatack
0a2e4caaa9
Catch up with changes in master branch
2013-12-07 01:51:55 +01:00
Alejandro Babio
5c990b9d18
Fix mysql tests. Move sort, search & admin fields from ransacker to DB.
2013-11-26 10:15:18 -03:00
Alejandro Babio
2d5de7301c
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
spec/ransack/adapters/active_record/base_spec.rb
2013-11-26 08:49:07 -03:00
Alejandro Babio
3da2427e37
Add auth_object support to attribute & sort nodes when call
...
ransackable_attributes or ransortable_attributes.
2013-11-22 09:44:27 -03:00
Ryan Bigg
458f2ffbde
Add email field to Person model (for wildcard testing, coming soon)
2013-11-06 16:37:08 +11:00
Ryan Bigg
810a954477
Add email field to Person model (for wildcard testing, coming soon)
2013-11-06 16:37:00 +11:00
Ryan Bigg
33fe61369a
Greatly reduce amount of people created during seeding (from thousands down to 12)
2013-11-06 16:19:35 +11:00
Ryan Bigg
bbb9e4b112
Add testing support for MySQL and PostgreSQL databases
2013-11-06 16:01:46 +11:00
Ryan Bigg
bf2fb88284
Add testing support for MySQL and PostgreSQL databases
...
Conflicts:
spec/support/schema.rb
2013-11-06 16:01:25 +11:00
Alejandro Babio
852c3db6c5
Only ransackable_attributes are valid for search. Fix spec and add one
...
to test search valid attributes. Remove unused formatter from schema.rb.
2013-10-29 20:16:49 -03:00
Alejandro Babio
47d7a95eac
Allow sort by a field, and not use in search.
...
Accepts sort column only if it's a ransortable_attribute.
accepts sort column only if it's a ransortable_attribute.
2013-10-25 15:36:52 -03:00
Bonias
ba6a8fcb18
Fixes issue #273 - translations for namespaced models. ActiveRecord uses i18n_key methods which return "namespace/model_name"("namespace.model_name" in rails 3.0.x) for Namespace::ModelName. Ransack should used the same pattern.
2013-09-05 11:13:03 +02:00
jonatack
9e719185f6
Use Rails 4 active record syntax
2013-08-12 10:56:20 +02:00
jonatack
40b239416c
Backwards compatibility fixes for Ruby 1.8.7
2013-08-08 12:50:21 +02:00
jonatack
cb2ff12e34
Use more explicit ActiveRecord::VERSION::MAJOR
2013-08-06 00:17:24 +02:00
jonatack
87ad87abda
Prepare for Rails 4 compatibility with active_record versioning
2013-08-06 00:01:52 +02:00
jonatack
49c1e3134c
Use Ruby 1.9 hash syntax
2013-08-04 15:13:41 +02:00
Washington Luiz
0e79779fc3
Remove deprecated ActiveSupport::Benchmarkable#silence
2013-08-01 00:24:39 -03:00
jonatack
2ded14b548
Default_scope without a block is deprecated in Rails 4
2013-07-04 16:24:17 +02:00
jonatack
e3914b814f
Merge further elements from spectator's Rails 3 comptability work, merge pull request #208 from pdf/reorder, use Rails 4 active-record distinct method which replaces uniq
2013-05-23 13:33:00 +02:00
Peter Fern
1cfebb7158
Reorder results to override orders applied up the chain (eg - scopes)
2013-02-28 17:10:49 +11:00
Ernie Miller
3f9fa1c2bb
Bump version, use polyamorous
2011-09-03 15:37:02 -04:00
Ernie Miller
6fa15a20cd
Don't use present? to check for presence (allow false as value). Fixes #9
2011-07-17 10:46:30 -04:00
Ernie Miller
2725cf28d4
Demonstrate use of functions in ransackers
2011-04-11 14:39:40 -04:00
Ernie Miller
d936136749
Test ransacker access via associations
2011-04-11 12:59:26 -04:00
Ernie Miller
294015309b
Initial commit.
2011-03-30 20:31:39 -04:00