registrar-rails 0.0.8.alpha → 0.0.9.alpha

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: 223fd2fbf8fb3744ad86a1688e22b45c2d0747b2
4
- data.tar.gz: 1222cbefaffd6105c43b052753dafdeb09c9cbc5
3
+ metadata.gz: b6f8c6284bfffa18141cceac05c5a85a28faf176
4
+ data.tar.gz: dab9a8dd3d1c974a73929526dae0cecdeb9cbed4
5
5
  SHA512:
6
- metadata.gz: 99949a2f585f58c5028aff80078a12360334fb02a6b24091b016520d0cfb424bcf8540cffbc6921e858b2cad82ca3a20c0e0dfd7e2705013c0e6b2fef9652e69
7
- data.tar.gz: a3e99f6bcd284a6548a1262815667c38f5858c2e4db2744cdbfff39516f394c25a6c50afcd0fa961702fa4b6dd612a4e43bd2c988a6bd44d7081e299eacb28c7
6
+ metadata.gz: fe496460276cfede00004d1d1dc0eb38d305b501a29fb4d25db2886f96886eb21433dbacfbdf0758c1fc4a584f409c67cfb3a751e9edaa62d8781f4545303d3b
7
+ data.tar.gz: 48960e40325c75911332d9f9c8864b6c63347ed82b0afc8aa150edbf0b75ba056bef61ef3baba4b2895336c406d9075654ab6b5e2fd4ef0e15f2ce708bf6f030
@@ -9,6 +9,7 @@ module Registrar
9
9
 
10
10
  klass.class_eval do
11
11
  helper_method :current_profile
12
+ helper_method :reload_current_profile
12
13
  helper_method :current_profile?
13
14
  helper_method :logout
14
15
  end
@@ -32,6 +33,13 @@ module Registrar
32
33
  session[CURRENT_PROFILE_KEY] = nil
33
34
  end
34
35
 
36
+ def reload_current_profile
37
+ if env[REGISTRAR_PROFILE_KEY]
38
+ env[REGISTRAR_PROFILE_KEY] = Registrar::Middleware::config.handler.call(env[REGISTRAR_PROFILE_KEY])
39
+ try_to_store_current_profile
40
+ end
41
+ end
42
+
35
43
  def current_profile
36
44
  if session[CURRENT_PROFILE_KEY]
37
45
  YAML.load session[CURRENT_PROFILE_KEY]
@@ -1,5 +1,5 @@
1
1
  module Registrar
2
2
  module Rails
3
- VERSION = "0.0.8.alpha"
3
+ VERSION = "0.0.9.alpha"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: registrar-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8.alpha
4
+ version: 0.0.9.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Owiesniak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-11 00:00:00.000000000 Z
11
+ date: 2015-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails