will_paginate-materialize 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.mod +10 -0
- data/README.md +10 -10
- data/lib/materialize_pagination/railtie.rb +9 -0
- data/lib/materialize_pagination/version.rb +1 -1
- data/lib/materialize_pagination/view_helpers.rb +15 -0
- data/lib/will_paginate/materialize.rb +2 -3
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00d8ef8d2958ddb55154f297076c1433bd68f273
|
4
|
+
data.tar.gz: 7b5f3d86353f18fff34949884733c1735ae020c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a53f1765e34d781bbd5409227a8adc96abdbcc21c7fc838df2784d7c47e5f007f9632a568f67ebc5b23170c67bf86de3aa2932629de0d64e760f735343c259e
|
7
|
+
data.tar.gz: ff93ec3dbcf481fd1719a6bf2ea1d642120ada29134d665f783df294100355893757835a4c142fd408df6fddd3c4820db99ac1793f5f4108fc565cb3c4d942bd
|
data/CHANGELOG.mod
ADDED
data/README.md
CHANGED
@@ -20,23 +20,23 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
1. Install [Materialize-sass](https://github.com/mkhairi/materialize-sass)
|
24
|
-
2.
|
25
|
-
```ruby
|
26
|
-
<%= will_paginate @collection, renderer: MaterializePagination::Rails %>
|
23
|
+
1. Install [Materialize-sass](https://github.com/mkhairi/materialize-sass) (if you haven't already)
|
24
|
+
2. Add the following to your application.scss file
|
27
25
|
```
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
color: #fff;
|
32
|
-
}
|
26
|
+
.pagination a li.active {
|
27
|
+
color: #fff;
|
28
|
+
}
|
33
29
|
```
|
30
|
+
3. You're done! Use the will_paginate helper as you would otherwise.
|
31
|
+
```ruby
|
32
|
+
<%= will_paginate @collection %>
|
33
|
+
```
|
34
|
+
|
34
35
|
## Contributing
|
35
36
|
|
36
37
|
Bug reports and pull requests are welcome on GitHub at https://github.com/patricklindsay/will_paginate-materialize. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
37
38
|
|
38
39
|
### Further works
|
39
|
-
* Extend gem so the MaterializePagination renderer is the default renderer
|
40
40
|
* Add specs
|
41
41
|
|
42
42
|
## License
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module MaterializePagination
|
2
|
+
module ViewHelpers
|
3
|
+
# Change the default link renderer for will_paginate
|
4
|
+
def will_paginate(collection_or_options = nil, options = {})
|
5
|
+
if collection_or_options.is_a? Hash
|
6
|
+
options, collection_or_options = collection_or_options, nil
|
7
|
+
end
|
8
|
+
unless options[:renderer]
|
9
|
+
options = options.merge :renderer => MaterializePagination::Rails
|
10
|
+
end
|
11
|
+
super *[collection_or_options, options].compact
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: will_paginate-materialize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Lindsay
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- ".gitignore"
|
78
78
|
- ".rspec"
|
79
79
|
- ".travis.yml"
|
80
|
+
- CHANGELOG.mod
|
80
81
|
- CODE_OF_CONDUCT.md
|
81
82
|
- Gemfile
|
82
83
|
- LICENSE.txt
|
@@ -86,7 +87,9 @@ files:
|
|
86
87
|
- bin/setup
|
87
88
|
- lib/materialize_pagination/action_view.rb
|
88
89
|
- lib/materialize_pagination/materialize_renderer.rb
|
90
|
+
- lib/materialize_pagination/railtie.rb
|
89
91
|
- lib/materialize_pagination/version.rb
|
92
|
+
- lib/materialize_pagination/view_helpers.rb
|
90
93
|
- lib/will_paginate/materialize.rb
|
91
94
|
- will_paginate-materialize.gemspec
|
92
95
|
homepage: https://github.com/patricklindsay/will_paginate-materialize
|