Commit 4635a8c2 authored by Gregor Schmidt's avatar Gregor Schmidt

[#416] using a simpler approach to replace node with partial

parent e3f54d47
......@@ -86,10 +86,6 @@ private
replace_selectors = ['#watcher']
end
watcher_partial = lambda do
render_to_string(:partial => 'watchers/watchers', :locals => {:watched => @watched})
end
respond_to do |format|
format.html { redirect_to :back }
format.js do
......@@ -99,9 +95,7 @@ private
case selector
when '#watchers'
page.select('#watchers').each do |node|
node.update watcher_partial.call
end
page.replace_html 'watchers', :partial => 'watchers/watchers', :locals => {:watched => @watched}
else
page.select(selector).each do |node|
options = {:replace => replace_selectors}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment