script_flow 0.0.2 → 0.0.3
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.
- data/README.md +14 -2
- data/lib/script_flow/helpers.rb +3 -2
- data/lib/script_flow/version.rb +1 -1
- data/script_flow.gemspec +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# ScriptFlow
|
2
2
|
|
3
|
-
|
3
|
+
When you rendering the ERB templates/partials, utility remembers javascript syntax and add it to the end of Ajax response body
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,19 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
View html.erb template/partial:
|
22
|
+
|
23
|
+
<%= script do %>
|
24
|
+
alert('Hello Script Flow');
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
# When current request format is Mime::HTML acts as `javascript_tag` helper. During Ajax request (Mime::JS) add script to the end of response body.
|
28
|
+
|
29
|
+
<%= script_for :head do %>
|
30
|
+
alert('Hello Script Flow');
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
# When current request format is Mime::HTML acts as `content_for :head` with `javascript_tag` helpers. During Ajax request (Mime::JS) add script to the end of response body.
|
22
34
|
|
23
35
|
## Contributing
|
24
36
|
|
data/lib/script_flow/helpers.rb
CHANGED
data/lib/script_flow/version.rb
CHANGED
data/script_flow.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = ScriptFlow::VERSION
|
9
9
|
gem.authors = ["Valery Kvon"]
|
10
10
|
gem.email = ["addagger@gmail.com"]
|
11
|
-
gem.description = %q{When you rendering the ERB templates/partials, utility remembers javascript syntax and add it to the end of
|
11
|
+
gem.description = %q{When you rendering the ERB templates/partials, utility remembers javascript syntax and add it to the end of Ajax response body}
|
12
12
|
gem.summary = %q{Auto load script from rendered ERB during Ajax request}
|
13
13
|
gem.homepage = ""
|
14
14
|
gem.homepage = %q{http://vkvon.ru/projects/script_flow}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: script_flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: When you rendering the ERB templates/partials, utility remembers javascript
|
15
|
-
syntax and add it to the end of
|
15
|
+
syntax and add it to the end of Ajax response body
|
16
16
|
email:
|
17
17
|
- addagger@gmail.com
|
18
18
|
executables: []
|