ransacker_translator 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 482d019d08c8f90a55a4aeb478efabdccbb43dcf
|
4
|
+
data.tar.gz: 6ff810c57e1584821c6986aa422a93b757602446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 000f5adc85a50e91ea3db8a79fd248b848dc88bd41d58399e7e5cfb4116e25f32c187ccc56f0f68805717977fb3b4a449ac1f8628e60a6651b4f32cd694d6911
|
7
|
+
data.tar.gz: 661df29e1287f1c351b243fd088f967e922ec91181cba0398baee2b2167da7841fac2c1e18d5c2fee1b75b4055a57f275a91791a0e33826fe0fe56bb1584fd66
|
data/Rakefile
CHANGED
@@ -4,15 +4,15 @@ rescue LoadError
|
|
4
4
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
5
|
end
|
6
6
|
|
7
|
-
require 'rdoc/task'
|
8
|
-
|
9
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
7
|
+
# require 'rdoc/task'
|
8
|
+
#
|
9
|
+
# RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
# rdoc.rdoc_dir = 'rdoc'
|
11
|
+
# rdoc.title = 'RansackerTranslator'
|
12
|
+
# rdoc.options << '--line-numbers'
|
13
|
+
# rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
# rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
# end
|
16
16
|
|
17
17
|
|
18
18
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module RansackerTranslator
|
2
|
+
module FormatRansackParameters
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
def format_ransack_params
|
6
|
+
if params[:q].present?
|
7
|
+
params[:q].keys.each do |key|
|
8
|
+
if key =~ /_all\z/ || key =~ /_any\z/
|
9
|
+
params[:q][key] = params[:q][key].split(' ') if params[:q][key].instance_of? String
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ransacker_translator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toyoaki Oko
|
@@ -60,9 +60,9 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- MIT-LICENSE
|
63
|
-
- README.rdoc
|
64
63
|
- Rakefile
|
65
64
|
- lib/ransacker_translator.rb
|
65
|
+
- lib/ransacker_translator/controllers/concerns/format_ransack_parameters.rb
|
66
66
|
- lib/ransacker_translator/models/concerns/ransacker_translator.rb
|
67
67
|
- lib/ransacker_translator/railtie.rb
|
68
68
|
- lib/ransacker_translator/version.rb
|
data/README.rdoc
DELETED