Integration of pop-up and generic js.erb

This commit is contained in:
chris2tof committed 2011-12-28 20:49:53 +08:00
1 parent 62aaf79491
commit 245def9cb6
14 files changed
+1613 -54

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
var to_render = '';
<% if value %>
to_render = "<%= escape_javascript(render(:partial => partial, :object => value, :locals => locals)) %>"
<% elsif values %>
to_render = "<%= escape_javascript(render(:partial => partial, :collection => values, :locals => locals)) %>"
<% end %>
$("#<%= id %>").<%= function %>(to_render);