native 2.0.0 → 2.0.1
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/app/controllers/native/application_controller.rb +0 -5
- data/app/controllers/native/platforms_controller.rb +5 -1
- data/lib/native/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4538b61237cafb2d12cab88c7b5899e9ec372bd435fc3074173600526f90a144
|
4
|
+
data.tar.gz: f152537eaa655ae2d3e9f7b8bd45f5cef6732cb1fef1c7d84c6cb5ac7b8feacc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32b98ff9a526b4e7bd6033743963e88c31fc9f7b3984f071e4e1a0199ab87f5b6e7465c56c2631b9fe573e3eb699dab5931cfd9f4dd1c66653b40b02b3521f7a
|
7
|
+
data.tar.gz: b3be9a4bebdb9d586a6ea5664ee7a6712269ac9448accd31a686768ccdfe6e47d345400aa3caf579d5c166a524df7296e8736bfdef9a33044ae239863709fe08
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -106,7 +106,7 @@ Go to `app/assets/config/manifest.js` and add the following lines:
|
|
106
106
|
Let's move on to your devise class. For instance `User` located in `app/models/user.rb`. Associate belonging `App` objects:
|
107
107
|
|
108
108
|
```ruby
|
109
|
-
has_many :apps
|
109
|
+
has_many :apps, class_name: 'Native::App'
|
110
110
|
```
|
111
111
|
|
112
112
|
Lastly, got to your routes file (`config/routes.rb`) and mount the `Native::Engine` class:
|
@@ -60,7 +60,7 @@ module Native
|
|
60
60
|
@app.platform = platform
|
61
61
|
@app.url = url
|
62
62
|
end
|
63
|
-
@app.owner = ApplicationController.set_app_owner || set_app_owner
|
63
|
+
@app.owner = ApplicationController.try(:set_app_owner) || set_app_owner
|
64
64
|
@app.last_used = Time.now
|
65
65
|
@app.save!
|
66
66
|
|
@@ -69,5 +69,9 @@ module Native
|
|
69
69
|
cookies[:nativeApp] = url
|
70
70
|
end
|
71
71
|
|
72
|
+
def set_app_owner
|
73
|
+
current_user if current_user
|
74
|
+
end
|
75
|
+
|
72
76
|
end
|
73
77
|
end
|
data/lib/native/version.rb
CHANGED