magic_grid 0.12.5 → 0.12.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -0
- data/lib/magic_grid/definition.rb +1 -1
- data/lib/magic_grid/version.rb +1 -1
- data/spec/collection_spec.rb +5 -5
- metadata +6 -5
data/README.md
CHANGED
@@ -2,6 +2,7 @@ MagicGrid
|
|
2
2
|
=========
|
3
3
|
© 2011-2013 Ryan Graham, Dennis Taylor
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/magic_grid.png)](http://badge.fury.io/rb/magic_grid)
|
5
6
|
[![Build Status](https://travis-ci.org/rmg/magic_grid.png?branch=master)](https://travis-ci.org/rmg/magic_grid)
|
6
7
|
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/rmg/magic_grid)
|
7
8
|
|
@@ -64,6 +65,12 @@ it generates. Make sure to include `magic_grid.js` in your view or application w
|
|
64
65
|
### :per_page
|
65
66
|
Sets the number of rows per page in the paginator.
|
66
67
|
|
68
|
+
### :title
|
69
|
+
Sets a text string to include in the top of the grid's `thead` to display as a title for the grid.
|
70
|
+
|
71
|
+
### and more...
|
72
|
+
There's a.. *ahem* slight lack of documentation at the moment. Pull requests welcome?
|
73
|
+
|
67
74
|
Development
|
68
75
|
-----------
|
69
76
|
|
data/lib/magic_grid/version.rb
CHANGED
data/spec/collection_spec.rb
CHANGED
@@ -197,8 +197,8 @@ describe MagicGrid::Collection do
|
|
197
197
|
context "when #page (possibly from Kaminari) is available" do
|
198
198
|
it "should call paginate helper when it is detected" do
|
199
199
|
array = [1].tap do |a|
|
200
|
-
a.should_receive(:per).with(1)
|
201
|
-
a.should_receive(:page).with(1)
|
200
|
+
a.should_receive(:per).with(1).and_return(a)
|
201
|
+
a.should_receive(:page).with(1).and_return(a)
|
202
202
|
end
|
203
203
|
collection = MagicGrid::Collection.new(array, nil)
|
204
204
|
collection.per_page = 1
|
@@ -212,11 +212,11 @@ describe MagicGrid::Collection do
|
|
212
212
|
it "should call paginate helper when it is detected" do
|
213
213
|
array = Array.new(10) { 1 }
|
214
214
|
kaminaried_array = [1].tap do |ka|
|
215
|
-
ka.should_receive(:per).with(1)
|
216
|
-
ka.should_receive(:page).with(1)
|
215
|
+
ka.should_receive(:per).with(1).and_return(ka)
|
216
|
+
ka.should_receive(:page).with(1).and_return(ka)
|
217
217
|
end
|
218
218
|
kaminari = double.tap do |k|
|
219
|
-
k.should_receive(:paginate_array).with(array)
|
219
|
+
k.should_receive(:paginate_array).with(array).and_return(kaminaried_array)
|
220
220
|
end
|
221
221
|
collection = MagicGrid::Collection.new(array, nil)
|
222
222
|
collection.per_page = 1
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: magic_grid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.12.
|
5
|
+
version: 0.12.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ryan Graham
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
prerelease: false
|
@@ -188,7 +188,8 @@ files:
|
|
188
188
|
- test/dummy/app/helpers/application_helper.rb
|
189
189
|
- test/magic_grid_test.rb
|
190
190
|
homepage: https://github.com/rmg/magic_grid
|
191
|
-
licenses:
|
191
|
+
licenses:
|
192
|
+
- MIT
|
192
193
|
post_install_message:
|
193
194
|
rdoc_options: []
|
194
195
|
require_paths:
|
@@ -199,7 +200,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
200
|
- !ruby/object:Gem::Version
|
200
201
|
segments:
|
201
202
|
- 0
|
202
|
-
hash:
|
203
|
+
hash: 2102927067340220080
|
203
204
|
version: '0'
|
204
205
|
none: false
|
205
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -208,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
209
|
- !ruby/object:Gem::Version
|
209
210
|
segments:
|
210
211
|
- 0
|
211
|
-
hash:
|
212
|
+
hash: 2102927067340220080
|
212
213
|
version: '0'
|
213
214
|
none: false
|
214
215
|
requirements: []
|