Skip to content

Instantly share code, notes, and snippets.

@co3k
Created February 5, 2010 01:23
Show Gist options
  • Save co3k/295368 to your computer and use it in GitHub Desktop.
Save co3k/295368 to your computer and use it in GitHub Desktop.
Index: app/controllers/members_controller.rb
===================================================================
--- app/controllers/members_controller.rb (revision 3363)
+++ app/controllers/members_controller.rb (working copy)
@@ -35,6 +35,7 @@
end
respond_to do |format|
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
+ format.xml { head :created }
format.js {
render(:update) {|page|
page.replace_html "tab-content-members", :partial => 'projects/settings/members'
Index: config/routes.rb
===================================================================
--- config/routes.rb (revision 3363)
+++ config/routes.rb (working copy)
@@ -162,6 +162,7 @@
end
map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new'
+ map.connect 'projects/:id/members.:format', :controller => 'members', :action => 'new', :format => /xml/
map.with_options :controller => 'users' do |users|
users.with_options :conditions => {:method => :get} do |user_views|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment