scenejs_on_rails 1.0.8 → 1.0.9

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: a5999f51fab428200dde577e059cd5c602dddd98
4
- data.tar.gz: 7b132695c8f0e99cbf785b9be35df1cfbc92c3ec
3
+ metadata.gz: 8e23cd4cb0e664169dc94ce616924c734a47082b
4
+ data.tar.gz: 36b1ea8cc6ae409fc5a5606ab57b19a3ebae9cd7
5
5
  SHA512:
6
- metadata.gz: 19356ad3f1f4df3e39bf34a72a0036350148ccc9d5b2070f832215fec883eaa0fe5e7e8bd6258f6a1588f578b7bb2abd742ab406f73159b9a91d54d7b1e3aeed
7
- data.tar.gz: 0588c621111bbe9f18c12c3da6c4498ad41f0452a6da9292ff9f78e662a0d152164ca1b11ad89d33896534c2c8ea50070e72b842d67d8a89007aca6103d499f7
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
- respond_to do |format|
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
@@ -1,4 +1,4 @@
1
1
  module ScenejsOnRails
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  SCENEJS_VERSION = "3.2"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scenejs_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis Alridge