execjs-rails 0.2.2.2 → 0.2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/execjs/rails/engine.rb +7 -1
- data/lib/execjs/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: 46cef59a62e2c73481cd6f6094677eb2b7a591b8
|
4
|
+
data.tar.gz: be40c5030c362e070a60641cf55738198f37be1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 306e0160dfd35dd42f6f687bf504e657342ffa09fc5499228364fc3e0bb48bc6cfbc36767e56408bf99ea28222167a2a3f02f6ce50c7e27f431b216c61749fb8
|
7
|
+
data.tar.gz: 71876ef3e04cfe2081e21f48e1d0f82cd1a04f42c6215600df7ecd8ea8a4a370471457b87c37455f420afa3463b34a2cb680b2dcba2da21b39d5c9a809ce1707
|
data/lib/execjs/rails/engine.rb
CHANGED
@@ -11,9 +11,15 @@ module ExecJS
|
|
11
11
|
config.execjs_rails.server_javascripts = ['server.js']
|
12
12
|
config.execjs_rails.has_view_function_name = 'execjs_rails_has_view'
|
13
13
|
config.execjs_rails.handler_function_name = 'execjs_rails_handler'
|
14
|
+
config.execjs_rails.blacklisted_assigns = []
|
14
15
|
|
15
16
|
config.execjs_rails.view_to_function_options = lambda do |view, options|
|
16
|
-
|
17
|
+
# reject keys in the blacklist
|
18
|
+
assigns = view.assigns.reject do |key|
|
19
|
+
config.execjs_rails.blacklisted_assigns.include?(key)
|
20
|
+
end
|
21
|
+
|
22
|
+
assigns.stringify_keys.merge!({
|
17
23
|
controller: view.controller_name,
|
18
24
|
action: view.action_name,
|
19
25
|
csrf_token: view.form_authenticity_token || nil,
|
data/lib/execjs/rails/version.rb
CHANGED