ransack_memory 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d62aa8c4e249e26f8584cc8c3a7102175891fcae
4
- data.tar.gz: 8aedb8310e80203daf0c31ad1d47013c1eaa3c6e
3
+ metadata.gz: abefb2da0c94c8caee92ef550ca93bc48538e8a9
4
+ data.tar.gz: 442d357d0778cde47013f4f680721e0ff26bbe9a
5
5
  SHA512:
6
- metadata.gz: 5f14b1663ad1659046033f7af8a463fe6403e37f71beeac45811646694d072bd8b4bc6c61c4f15566f8a57793bd7f3f04c8f17ca265bd3de5abea8f25db0a064
7
- data.tar.gz: 678245d37a4f8d54c91226b96539ae8004dc261563f72a705d046bd5f679862ada25ae14b86c808601c019c8da31768152461dbca393f572da979dab19a56a9a
6
+ metadata.gz: ceb4da1cd2186094774fac35ff3e697a7d7e716f40d00b949a1a32d2d7fa65087360cd8969178ad3a159f82f50d9a8af507b330ebf87a21e74b244e6f453e05b
7
+ data.tar.gz: 8b1bbacd8e909bb8746db3ffbc52dcbaa898764172339418c0ac6d79a05306d68978bd374f2b11e0b2d4c74cc40a8abff985605f18e0ec7f06edc178d28bef79
data/README.md CHANGED
@@ -27,7 +27,7 @@ Add this in your views where you have search forms. This is clear button, which
27
27
  You can pass any of link attributes:
28
28
 
29
29
  ```erb
30
- <%= clear_filter, class: 'btn btn-primary', data: {confirm: 'Really?', my_data: 'something'} %>
30
+ <%= clear_filter, title: 'Clear Filter', class: 'btn btn-primary', data: {confirm: 'Really?', my_data: 'something'} %>
31
31
  ```
32
32
 
33
33
  ## Configuration
@@ -36,8 +36,7 @@ Create file in config/initializers/ransack_memory.rb with this content:
36
36
 
37
37
  ```ruby
38
38
  RansackMemory::Core.config = {
39
- param: :q, # this means the default Ransack param name for searching. You can change it
40
- link_label: 'Clear filter' # clear_filter link label
39
+ param: :q # this means the default Ransack param name for searching. You can change it
41
40
  }
42
41
  ```
43
42
 
@@ -1,3 +1,3 @@
1
1
  <% if params[RansackMemory::Core.config[:param].presence || :q].present? %>
2
- <%= link_to RansackMemory::Core.config[:link_label].presence || 'Clear filter', url_for + "?cancel_filter=true", opts %>
2
+ <%= link_to opts[:title].presence || 'Clear filter', url_for + "?cancel_filter=true", opts.except(:title) %>
3
3
  <% end %>
@@ -1,2 +1,2 @@
1
1
  - if params[RansackMemory::Core.config[:param].presence || :q].present?
2
- = link_to RansackMemory::Core.config[:link_label].presence || 'Clear filter', url_for + "?cancel_filter=true", opts
2
+ = link_to opts[:title] || 'Clear filter', url_for + "?cancel_filter=true", opts.except(:title)
@@ -1,3 +1,3 @@
1
1
  module RansackMemory
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -1,4 +1,3 @@
1
1
  RansackMemory::Core.config = {
2
- param: :q, # this means the default Ransack param name for searching. You can change it
3
- link_label: 'Clear filter' # clear_filter link label
2
+ param: :q # this means the default Ransack param name for searching. You can change it
4
3
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ransack_memory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Lapiš
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-06 00:00:00.000000000 Z
11
+ date: 2018-06-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Automatically save and load ransack's filtered params into session
14
14
  email: richard.lapis@gmail.com