magic_grid 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,7 @@ module MagicGrid
27
27
  base_params = grid.base_params
28
28
  data = {
29
29
  :searcher => grid.options[:searcher],
30
+ :current => controller.request.fullpath,
30
31
  :live_search => grid.options[:live_search],
31
32
  :listeners => (grid.options[:listeners] unless grid.options[:listeners].empty?),
32
33
  :remote => grid.options[:remote],
@@ -1,3 +1,3 @@
1
1
  module MagicGrid
2
- VERSION = "0.10.2"
2
+ VERSION = "0.10.3"
3
3
  end
data/spec/helpers_spec.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'magic_grid/helpers'
3
3
  require 'action_controller'
4
+ require "active_support/core_ext"
4
5
 
5
6
  describe MagicGrid::Helpers do
6
7
 
@@ -9,13 +10,14 @@ describe MagicGrid::Helpers do
9
10
 
10
11
  let(:empty_collection) { [] }
11
12
  let(:column_list) { [:name, :description] }
12
-
13
- let(:view_renderer) {
13
+ let(:controller) {
14
+ request = double.tap{ |r|
15
+ r.stub(:fullpath, "/foo?page=bar")
16
+ }
14
17
  double.tap { |v|
15
- v.stub(:render)
18
+ v.stub(:render) { nil }
16
19
  v.stub(:params) { {} }
17
- # controller.stub(:option)
18
- v.stub(:url_for) {|h| "/foo?page=#{h[:page]}"}
20
+ v.stub(:request) { request }
19
21
  }
20
22
  }
21
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic_grid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-01 00:00:00.000000000 Z
12
+ date: 2012-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -208,7 +208,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
208
208
  version: '0'
209
209
  segments:
210
210
  - 0
211
- hash: 1793131712748144564
211
+ hash: -3603937317512539474
212
212
  required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  none: false
214
214
  requirements:
@@ -217,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  version: '0'
218
218
  segments:
219
219
  - 0
220
- hash: 1793131712748144564
220
+ hash: -3603937317512539474
221
221
  requirements: []
222
222
  rubyforge_project:
223
223
  rubygems_version: 1.8.23