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: cfd77242b19a837733fecd9aa1c6e0162b05eb06
4
- data.tar.gz: d863db4bdb1bcb8c859df4f407f864a2e00e08e7
3
+ metadata.gz: 482d019d08c8f90a55a4aeb478efabdccbb43dcf
4
+ data.tar.gz: 6ff810c57e1584821c6986aa422a93b757602446
5
5
  SHA512:
6
- metadata.gz: aedcae869558a74e827c9f80b9697efab91fc9da52a39bf3a3746bc36bdeda39da58e72b0ebfc1618163fddaa5ca71464f3ea2658e47a5a0c0c3e28f39037b9a
7
- data.tar.gz: 08a383a097a4c03b9ca760f2f6afc2646e85b7620fd82f94acba36aebcb9957ca14f16d9951357907ca81b81902fa556fc0a66d59d564d905f2e151706e7aeba
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
- 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
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
@@ -1,5 +1,6 @@
1
1
  require 'rails/railtie'
2
2
  require 'ransacker_translator/models/concerns/ransacker_translator'
3
+ require 'ransacker_translator/controllers/concerns/format_ransack_parameters'
3
4
  require 'ransacker_translator/view_helpers'
4
5
 
5
6
  module RansackerTranslator
@@ -1,3 +1,3 @@
1
1
  module RansackerTranslator
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  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.1
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
@@ -1,3 +0,0 @@
1
- = RansackerTranslator
2
-
3
- This project rocks and uses MIT-LICENSE.