ransack_memory 0.0.5 → 0.0.7

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: 53163621f241e9f3a29c0a8bffe48e32c5f3e60b
4
- data.tar.gz: '0960d53e98ecbb53b8dd62589e4d277531d03978'
3
+ metadata.gz: 84da2b6282251a6c2235bb4e88b0439188cd344b
4
+ data.tar.gz: 8c672606a1b68252a0fd0bcc6812da4921e7f358
5
5
  SHA512:
6
- metadata.gz: c6844bd183a86491ab2f8f24538585ab557e1a00b9801ef03962342424e2df72e8077359a9e2a326c74e8aae60d37ca94b618a1eb5637aca2787d238a92bdb93
7
- data.tar.gz: f4de744aac0b48d88d3e30f39d872d1854a1917677df5b5667d33bd168b06c250f96a8742cfdd73eadff3b500ce2880b2580b0ec52ea857cca8f75ae988519b2
6
+ metadata.gz: ffa3fee99e4c59e0fe6388fc2260932374ad6dea4216c6fc5601fec09a759a4ba7073b56cc0db73d34416b95acc1e468b2cd42fe51c245393ced4ae440b5c941
7
+ data.tar.gz: 8f3db8e4b5109f6730282c625eb20b4dcaad7c478e00820ee853fd071acafb65828ead6e97704f082811efa994c86200e12b303a064adc4693348fae6ab73220
@@ -4,7 +4,7 @@ module RansackMemory
4
4
 
5
5
  def save_and_load_filters
6
6
 
7
- session_key_base = "#{controller_name}_#{action_name}_#{request.xhr?}"
7
+ session_key_base = "ranmemory_#{controller_name}_#{action_name}_#{request.format.symbol.to_s}"
8
8
 
9
9
  # permit search params
10
10
  params[::RansackMemory::Core.config[:param]].permit! if params[::RansackMemory::Core.config[:param]].present? && params[::RansackMemory::Core.config[:param]].respond_to?(:permit)
@@ -44,5 +44,12 @@ module RansackMemory
44
44
 
45
45
  # session[:last_page] = params[:page]
46
46
  end
47
+
48
+ # controller method, useful when you want to clear sessions when sign into another user
49
+ def clear_sessions
50
+ session.keys.each do |key|
51
+ session.delete(key) if key =~ /ranmemory_/
52
+ end
53
+ end
47
54
  end
48
55
  end
@@ -1,3 +1,3 @@
1
1
  module RansackMemory
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ransack_memory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Lapiš
@@ -36,17 +36,17 @@ require_paths:
36
36
  - lib
37
37
  required_ruby_version: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: 1.9.3
42
42
  required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  requirements: []
48
48
  rubyforge_project:
49
- rubygems_version: 2.6.13
49
+ rubygems_version: 2.4.8
50
50
  signing_key:
51
51
  specification_version: 3
52
52
  summary: Automatically save and load ransack's filtered params into session