bolter 0.3.1 → 0.3.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: a6e7447428e048162fffb71c8feb92c6d537e40c
4
- data.tar.gz: 008034a83b59cf18a0a8be75f9e7c6209da7734d
3
+ metadata.gz: 1aee6b2793c3662803bf4dac0de89cadccaba719
4
+ data.tar.gz: ea0cc67491451dad652aaffe9dea451e1c2a7032
5
5
  SHA512:
6
- metadata.gz: 2134b161ad6dac22e4bbcb487facd68fa9e0d9994a55f3e83fa7cdede4e1c7651a402d16bfdcfe4a825aace466881f2722ec7b4f8aeb8aab136d3c1671c9a66a
7
- data.tar.gz: a300c1ff681d3c221c2ec2092e8ea10ad360e5448c3224d0cda6e5ae5eaa385d59474fd0ec9f93d571d3ab4e66503751de9d59196d2edd247c59e1dc06caec25
6
+ metadata.gz: 224809dd5b1fd24dcf113638797cf2f092dcedffa1e5ade5ce0f4c961c90022ad4f2a6c136dcaf4af47966a0a15cd1c33eb83ade94f75c02bea0dde4ac6becf8
7
+ data.tar.gz: 53b344f902f7ca7f186f9b0503419e66dbb9c1746f42942d897a53e5deafe5682e4410ffab4b534231bbb7fe4427d88066b012a5a27dac1c106869ec48587223
data/README.md CHANGED
@@ -27,7 +27,6 @@ Model:
27
27
  class Book < ActiveRecord::Base
28
28
  include Bolter::Searchable
29
29
  include Bolter::Sortable
30
-
31
30
  scope :with_author, -> (author) {
32
31
  self.where("author like ?",author)
33
32
  }
@@ -52,9 +51,28 @@ View:
52
51
 
53
52
  Controller:
54
53
  ```ruby
55
- @books = Book.search(params[:filters]).sorting(params[:sorting])
54
+ class BooksController < ApplicationController
55
+ def index
56
+ @books = Book.search(params[:search]).sorting(params[:sorting])
57
+ end
58
+ end
59
+ ```
60
+
61
+ Using strong_parameters:
62
+ ```ruby
63
+ class BooksController < ApplicationController
64
+ def index
65
+ @books = Book.search(search_params).sorting(params[:sorting])
66
+ end
67
+ private
68
+ def search_params
69
+ params.fetch(:search, {}).permit(:with_user)
70
+ end
71
+ end
56
72
  ```
57
73
 
74
+
75
+
58
76
  ## Development
59
77
 
60
78
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
data/bolter.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
16
16
  spec.require_paths = ['lib']
17
17
 
18
- spec.add_development_dependency 'bundler', '~> 1.8'
18
+ spec.add_development_dependency 'bundler', '~> 1.7'
19
19
  spec.add_development_dependency 'rake', '~> 10.0'
20
20
  spec.add_development_dependency 'activerecord'
21
21
  spec.add_development_dependency 'sqlite3'
@@ -1,3 +1,3 @@
1
1
  module Bolter
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Shurmin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-12 00:00:00.000000000 Z
11
+ date: 2016-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.8'
19
+ version: '1.7'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.8'
26
+ version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -153,4 +153,3 @@ signing_key:
153
153
  specification_version: 4
154
154
  summary: This gem include sorting and filtering methods
155
155
  test_files: []
156
- has_rdoc: