paloma 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/lib/paloma/action_controller_filters.rb +9 -6
- data/paloma.gemspec +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -8,6 +8,7 @@ Advantages
|
|
8
8
|
* Javascript files are organized per controller just like app/views folder of Rails.
|
9
9
|
* Javascript file per controller's action.
|
10
10
|
* The ability to choose what specific javascript code to run on a specific action.
|
11
|
+
* Easily make ruby variables available on your javascript files.
|
11
12
|
|
12
13
|
Quick Example
|
13
14
|
-
|
@@ -25,13 +25,16 @@ module Paloma
|
|
25
25
|
:locals => {:callbacks => session[:callbacks]})
|
26
26
|
|
27
27
|
before_body_end_index = response_body[0].rindex('</body>')
|
28
|
-
before_body_end_content = response_body[0][0, before_body_end_index].html_safe
|
29
|
-
after_body_end_content = response_body[0][before_body_end_index..-1].html_safe
|
30
28
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
if before_body_end_index.present?
|
30
|
+
before_body_end_content = response_body[0][0, before_body_end_index].html_safe
|
31
|
+
after_body_end_content = response_body[0][before_body_end_index..-1].html_safe
|
32
|
+
|
33
|
+
response_body[0] = before_body_end_content + paloma_txt + after_body_end_content
|
34
|
+
|
35
|
+
response.body = response_body[0]
|
36
|
+
clear_callbacks
|
37
|
+
end
|
35
38
|
end
|
36
39
|
|
37
40
|
|
data/paloma.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'paloma'
|
3
|
-
s.version = '1.2.
|
3
|
+
s.version = '1.2.2'
|
4
4
|
s.summary = "a sexy way to organize javascript files using Rails` asset pipeline"
|
5
5
|
s.description = "a sexy way to organize javascript files using Rails` asset pipeline"
|
6
6
|
s.authors = ["Karl Paragua", "Bia Esmero"]
|