rbjs 0.10.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,4 +30,4 @@ module Rbjs
30
30
  end
31
31
  end
32
32
 
33
- ActionView::Template.register_template_handler :rbjs, Rbjs::TemplateHandler.new
33
+ ActionView::Template.register_template_handler :rb, Rbjs::TemplateHandler.new
@@ -1,3 +1,3 @@
1
1
  module Rbjs
2
- VERSION = "0.10.7"
2
+ VERSION = "1.0.0"
3
3
  end
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
- It aims to keep your javascript on the server side and the browser dumb. [read more](http://buhrmi.github.com/rbjs)
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.10.7
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-25 00:00:00.000000000 Z
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