panda_pal 5.18.0 → 5.18.2

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
  SHA256:
3
- metadata.gz: a84b75147fd0b4ac07c4f0aafdda286b9e1f7a5cb16d64b8139e94b12ff82707
4
- data.tar.gz: ff14468ea46d91e4aca58048366e9bd93a481ec985ccb87d29ca270d70bd2f18
3
+ metadata.gz: eb0e4fb14c2e0d6b9e35ec6dd8e865c428d903ecea13870eaaf573c3799af975
4
+ data.tar.gz: 93e7c30bd6501db96b4a5cadd4b5d412b67992f292d39959496f3962c38f0963
5
5
  SHA512:
6
- metadata.gz: 8c885e4859fd35e5ec7f902ccf3edbe097485485e2907a7ecad04a4369d22cd0c5b7d22316dfa9d9e9d205b349ff26a06462baa87c13563a0599e6b6cdfa135c
7
- data.tar.gz: 8d91973e5c67bc16fdca3a4cb0b9493afc35d5d823f221caee125e1db1042915bd68f21a30d78e65bd81b472f315203fb64ae22a601be5109aad2ddf1b6e162f
6
+ metadata.gz: 4ed68a456f64341cd6627e08f6b24b7936e75b39b077d2d458695db7e7be58ddd723cfcf44b095001c411b66993971b042a33d8bc62f7f2aa07d95e36773568d
7
+ data.tar.gz: '08ccb27dd49356d5a51d020cd93cb86626ef1f108b99fcc75f38cd2a147fbc28859570cdd7dbafe7ef37d74b7ca08aa0a09793bc3d6b6e1ebac5c64158aec9aa'
@@ -5,7 +5,7 @@ module PandaPal::Concerns
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  class_methods do
8
- def cache_on_session(method_sym)
8
+ def cache_on_session(mthd_sym)
9
9
  mthd = instance_method(mthd_sym)
10
10
  pmthd_sym = :"_scache_#{mthd_sym}"
11
11
 
@@ -13,14 +13,14 @@ module PandaPal::Concerns
13
13
  private pmthd_sym
14
14
 
15
15
  class_eval <<~RUBY
16
- def #{method_sym}()
16
+ def #{mthd_sym}()
17
17
  cache_on_session(:#{pmthd_sym}) do
18
18
  #{pmthd_sym}()
19
19
  end
20
20
  end
21
21
  RUBY
22
22
 
23
- method_sym
23
+ mthd_sym
24
24
  end
25
25
  end
26
26
 
@@ -45,7 +45,9 @@ module PandaPal::Concerns
45
45
  raise "Ability class needs to set @rails_session or @controller to use this feature"
46
46
  end
47
47
 
48
- @rails_session ||= @controller.session unless defined?(@rails_session)
48
+ @rails_session ||= @controller&.session
49
+
50
+ @rails_session
49
51
  end
50
52
 
51
53
  # Delegate legacy AbilityHelper methods to panda_pal_session. TODO Should such direct usage be considered deprecated?
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = '5.18.0'
2
+ VERSION = '5.18.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda_pal
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.18.0
4
+ version: 5.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev