active_manageable 0.1.1 → 0.2.0

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.
@@ -11,26 +11,24 @@ module ActiveManageable
11
11
  attr_reader :ransack
12
12
 
13
13
  initialize_state_methods :initialize_ransack_state
14
+ end
14
15
 
15
- private
16
-
17
- def initialize_ransack_state
18
- @ransack = nil
19
- end
16
+ def initialize_ransack_state
17
+ @ransack = nil
18
+ end
20
19
 
21
- def search(opts)
22
- @ransack = @target.ransack(opts)
23
- @target = @ransack.result
24
- end
20
+ def search(opts)
21
+ @ransack = @target.ransack(opts)
22
+ @target = @ransack.result
23
+ end
25
24
 
26
- # Perform standard index module ordering when no ransack search params provided
27
- # or no ransack sorts params provided
28
- def order(attributes)
29
- if @ransack.blank? || @ransack.sorts.empty?
30
- @target = @target.order(get_order_attributes(attributes))
31
- else
32
- @target
33
- end
25
+ # Perform standard index module ordering when no ransack search params provided
26
+ # or no ransack sorts params provided
27
+ def order(attributes)
28
+ if @ransack.blank? || @ransack.sorts.empty?
29
+ @target = @target.order(order_attributes(attributes))
30
+ else
31
+ @target
34
32
  end
35
33
  end
36
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveManageable
4
- VERSION = "0.1.1"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_manageable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Hilton
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-04-18 00:00:00.000000000 Z
12
+ date: 2022-09-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord