【文件属性】:
文件名称:rbjs:Ruby on Rails的远程Javascript
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-20 01:08:51
Ruby
Rbjs是将1:1转换为Javascript的Ruby DSL
它与Rails 3.1和4以及Sinatra集成
什么?
代替这个(create.js.erb)
<% if @collection %>
jQuery(<%= j render(@image) %>).appendTo('<%= dom_id @collection %>').hide().show('slide')
<% else %>
jQuery(<%= j render(@image) %>).insertAfter('.dropzone').hide().show('slide')
<% end %>
你可以写这个(create.js.rb)
if @collection
jQuery(render @image).appendTo(dom_id @collection).hide!
【文件预览】:
rbjs-master
----lib()
--------rbjs.rb(4KB)
--------rbjs()
----Gemfile(88B)
----spec()
--------rbjs_spec.rb(4KB)
----Rakefile(28B)
----LICENSE(1KB)
----rbjs.gemspec(900B)
----.gitignore(33B)
----readme.md(852B)