ember-auth-rails 3.5.0 → 3.6.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.
data/README.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
window.Auth = evented.create({
|
|
8
8
|
authToken: null,
|
|
9
9
|
currentUserId: null,
|
|
10
|
+
currentUser: null,
|
|
10
11
|
jqxhr: null,
|
|
11
12
|
prevRoute: null,
|
|
12
13
|
signIn: function(data) {
|
|
@@ -23,8 +24,12 @@
|
|
|
23
24
|
data: data,
|
|
24
25
|
async: async,
|
|
25
26
|
success: function(json, status, jqxhr) {
|
|
27
|
+
var model;
|
|
26
28
|
_this.set('authToken', json[Auth.Config.get('tokenKey')]);
|
|
27
29
|
_this.set('currentUserId', json[Auth.Config.get('idKey')]);
|
|
30
|
+
if (model = Auth.Config.get('userModel')) {
|
|
31
|
+
_this.set('currentUser', model.find(_this.get('currentUserId')));
|
|
32
|
+
}
|
|
28
33
|
_this.set('jqxhr', jqxhr);
|
|
29
34
|
return _this.trigger('signInSuccess');
|
|
30
35
|
},
|
|
@@ -116,6 +121,7 @@
|
|
|
116
121
|
tokenDestroyUrl: null,
|
|
117
122
|
tokenKey: null,
|
|
118
123
|
idKey: null,
|
|
124
|
+
userModel: null,
|
|
119
125
|
baseUrl: null,
|
|
120
126
|
signInRoute: null,
|
|
121
127
|
signOutRoute: null,
|
data/lib/ember-auth/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ember-auth-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.6.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-03-
|
|
12
|
+
date: 2013-03-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: ember-rails
|