preflex 0.4.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: 67d3667d77a7d0425f91af0a9ce6fe20c7d43e575c86252ef771c4ab334cf507
4
- data.tar.gz: 6b388da6b8e195476a0d3bd96959705a7860a7ae490e1a7adb63d3da9a6b1a83
3
+ metadata.gz: 85fad3c7450ec6051cf1948562f64df430e238fd6f95b4234e949da5577410e5
4
+ data.tar.gz: 20738deda7d2d6376acc1464758ef32da297fe81a8b287de9343d0c8960608e9
5
5
  SHA512:
6
- metadata.gz: 1c0d73156f6dd65beb0e57a09cf8f98c1551999f2aab7f107d6f59f22585eba51f434ecf4e16c50ceb32676e261de25476837698dca37a6cb002ea1da62cd37e
7
- data.tar.gz: 14682868598d2e979abafda7f0e53fd252a93d57ed3d57ccefb99c9c121d03b4205f1d627b786ac5a57256ccac4a117212257dcdccbf9a344db64f858f4bff5d
6
+ metadata.gz: 3eb4c69998cb3521b5e98bb495270eda066a576eb03d8455c28b3c29171762091d41d79ed6acfa2328b7f6a4d4b0597c659ae5e9f4fd86e85884a235d5a54c9c
7
+ data.tar.gz: 9ffdee036844271c74e5ece5b520bd19bd7f99776696eb07fadd2df41c8c0225531fb8f55551c4f7dd38ca8a7b087c27367dd578d37673783e0b4453bd15d29e
@@ -43,7 +43,7 @@ module Preflex
43
43
 
44
44
  localStorage.setItem(this.localStorageKey, JSON.stringify(this.dataLocal))
45
45
  this.updateOnServer(name, value)
46
- document.dispatchEvent(new CustomEvent('preflex:preference-updated', { detail: { name, value } }))
46
+ document.dispatchEvent(new CustomEvent('preflex:preference-updated', { detail: { klass: this.klass, name, value } }))
47
47
  }
48
48
 
49
49
  updateOnServer(name, value) {
@@ -4,9 +4,11 @@ module Preflex
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace Preflex
6
6
 
7
- config.to_prepare do
8
- Preflex.base_controller_class.include(Preflex::SetCurrentContext)
9
- Preflex.base_controller_class_for_update.include(Preflex::SetCurrentContext) unless Preflex.base_controller_class_for_update < Preflex.base_controller_class
7
+ initializer 'preflex.set_current_context' do |app|
8
+ app.config.to_prepare do
9
+ Preflex.base_controller_class.include(Preflex::SetCurrentContext)
10
+ Preflex.base_controller_class_for_update.include(Preflex::SetCurrentContext) unless Preflex.base_controller_class_for_update < Preflex.base_controller_class
11
+ end
10
12
  end
11
13
  end
12
14
  end
@@ -1,3 +1,3 @@
1
1
  module Preflex
2
- VERSION = "0.4.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: preflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owais
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-12 00:00:00.000000000 Z
11
+ date: 2024-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails