diff --git a/app/views/watchers/_watchers.html.erb b/app/views/watchers/_watchers.html.erb index 4da8c0d..67e1f4f 100644 --- a/app/views/watchers/_watchers.html.erb +++ b/app/views/watchers/_watchers.html.erb @@ -9,18 +9,18 @@
<%= f.select :user_id, (watched.addable_watcher_users.collect {|m| [m.name, m.id]}), :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" %> + <% remote_form_for(:watcher, @watcher, + :url => {:controller => 'watchers', + :action => 'new', + :object_type => watched.class.name.underscore, + :object_id => watched}, + :method => :post, + :html => {:id => 'new-watcher-form'}) do |f| %> +
<%= f.select :user_id, (watched.addable_watcher_users.collect {|m| [m.name, m.id]}), :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" %> - <%= submit_tag l(:button_add) %> - <%= toggle_link l(:button_cancel), 'new-watcher-form'%>
- <% end %> + <%= submit_tag l(:button_add) %> + <%= toggle_link l(:button_cancel), 'new-watcher-form'%> + <% end %> <% end %> <%= watchers_list(watched) %>