scenejs_on_rails 1.0.8 → 1.0.9
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/app/controllers/scenejs_controller.rb +9 -3
- data/lib/scenejs_on_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e23cd4cb0e664169dc94ce616924c734a47082b
|
4
|
+
data.tar.gz: 36b1ea8cc6ae409fc5a5606ab57b19a3ebae9cd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48daf966cb8861903a60a3830f3c3acdf62de778e5dfbbee49969e6fe4f9a82a1987d4b2b2287b56cbc0b9dcb30bfbbafe6cabbf2ea1bedb58cefe79d2dc907d
|
7
|
+
data.tar.gz: fda1c8cfd0886b245403632b59c793b26bd2a620283634c45bb063d4bc838262019fcc20c3438ac7be635684cd19ade5d76c7f86881dde7c717608c5c121fc85
|
@@ -1,4 +1,6 @@
|
|
1
1
|
class ScenejsController < ApplicationController
|
2
|
+
skip_before_action :verify_authenticity_token, if: :js_request?
|
3
|
+
|
2
4
|
def get_scenejs_data
|
3
5
|
#scenejs grabs plugins from this path
|
4
6
|
|
@@ -45,13 +47,17 @@ class ScenejsController < ApplicationController
|
|
45
47
|
if binary #serves binary image data
|
46
48
|
send_data(@file)
|
47
49
|
else #serves inline js (system may send as application/zip but this causes no issues)
|
48
|
-
|
49
|
-
format.js { render inline: @file, layout: false, content_type: 'text/javascript' }
|
50
|
-
end
|
50
|
+
render inline: @file, layout: false, content_type: 'text/javascript'
|
51
51
|
end
|
52
52
|
else
|
53
53
|
raise "ActionController::RoutingError(Scenejs Plugin not found either in gem or app locations:\n #{in_gem_file_ref}\n #{in_app_file_ref})"
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
57
|
+
|
58
|
+
protected
|
59
|
+
|
60
|
+
def js_request?
|
61
|
+
request.format.js?
|
62
|
+
end
|
57
63
|
end
|