rbjs 0.10.7 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rbjs/setup_action_view.rb +1 -1
- data/lib/rbjs/version.rb +1 -1
- data/readme.md +21 -1
- metadata +2 -2
data/lib/rbjs/version.rb
CHANGED
data/readme.md
CHANGED
@@ -2,7 +2,27 @@
|
|
2
2
|
|
3
3
|
It integrates with Rails 3.1 and 4, and Sinatra
|
4
4
|
|
5
|
-
|
5
|
+
## What?
|
6
|
+
|
7
|
+
With Rbjs you can transform this (create.js.erb)
|
8
|
+
|
9
|
+
<% if @collection %>
|
10
|
+
jQuery(<%= j render(@image) %>).appendTo('<%= dom_id @collection %>').hide().show('slide')
|
11
|
+
<% else %>
|
12
|
+
jQuery(<%= j render(@image) %>).insertAfter('.dropzone').hide().show('slide')
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
into this (create.js.rb)
|
16
|
+
|
17
|
+
if @collection
|
18
|
+
jQuery(render @image).appendTo(dom_id @collection).hide!.show('slide')
|
19
|
+
else
|
20
|
+
jQuery(render @image).insertAfter('.dropzone').hide!.show('slide')
|
21
|
+
end
|
22
|
+
|
23
|
+
## Why?
|
24
|
+
|
25
|
+
Why not?
|
6
26
|
|
7
27
|
## Installation
|
8
28
|
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: rbjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 1.0.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Stefan Buhrmester
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
version_requirements: !ruby/object:Gem::Requirement
|