honkster-jelly 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/generators/jelly/templates/javascripts/jelly.js +1 -1
- data/jelly.gemspec +1 -1
- data/lib/jelly/jelly_controller.rb +2 -8
- metadata +1 -1
data/VERSION.yml
CHANGED
data/jelly.gemspec
CHANGED
@@ -29,19 +29,13 @@ module JellyController
|
|
29
29
|
when :iframe
|
30
30
|
"<textarea>#{jelly_callback_erb_template}</textarea>"
|
31
31
|
when :jsonp
|
32
|
-
|
33
|
-
jelly_callback_erb_template
|
32
|
+
"#{params[:callback]}(#{jelly_callback_erb_template});"
|
34
33
|
else
|
35
34
|
jelly_callback_erb_template
|
36
35
|
end
|
37
36
|
end
|
38
37
|
|
39
38
|
def jelly_callback_erb_template
|
40
|
-
|
41
|
-
<%= begin
|
42
|
-
json = instance_eval(&@jelly_block).to_json
|
43
|
-
@jsonp_callback ? "\#{@jsonp_callback}(\#{json});" : json
|
44
|
-
end %>
|
45
|
-
ERB
|
39
|
+
"<%= instance_eval(&@jelly_block).to_json %>"
|
46
40
|
end
|
47
41
|
end
|