Permalink
Browse files

fix: set format to xml

  • Loading branch information...
1 parent cc1d589 commit 9e57b948c8783229f93d72c11d1ddb6fa1360a6f Sven Krzyzak committed Aug 12, 2010
Showing with 21 additions and 20 deletions.
  1. +21 −20 config/routes.rb
View
@@ -1,28 +1,29 @@
ActionController::Routing::Routes.draw do |map|
- #meta / settings
- map.connect "mylyn/settings", :controller => "MylynConnector::Settings", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/version", :controller => "MylynConnector::Information", :action => "version", :conditions => {:method => :get}
- #attributes
- map.connect "mylyn/customfields", :controller => "MylynConnector::CustomFields", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/issuecategories", :controller => "MylynConnector::IssueCategories", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/issuepriorities", :controller => "MylynConnector::IssuePriorities", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/versions", :controller => "MylynConnector::Versions", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/queries", :controller => "MylynConnector::Queries", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/users", :controller => "MylynConnector::Users", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/timeentryactivities", :controller => "MylynConnector::TimeEntryActivities", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/trackers", :controller => "MylynConnector::Trackers", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/issuestatus", :controller => "MylynConnector::IssueStatus", :action => "all", :conditions => {:method => :get}
+ map.with_options :format => 'xml', :conditions => {:method => :get} do |rmc|
+ #meta / settings
+ rmc.connect "mylyn/settings", :controller => "MylynConnector::Settings", :action => "all"
+ rmc.connect "mylyn/version", :controller => "MylynConnector::Information", :action => "version"
- #projects
- map.connect "mylyn/projects", :controller => "MylynConnector::Projects", :action => "all", :conditions => {:method => :get}
+ #attributes
+ rmc.connect "mylyn/customfields", :controller => "MylynConnector::CustomFields", :action => "all"
+ rmc.connect "mylyn/issuecategories", :controller => "MylynConnector::IssueCategories", :action => "all"
+ rmc.connect "mylyn/issuepriorities", :controller => "MylynConnector::IssuePriorities", :action => "all"
+ rmc.connect "mylyn/versions", :controller => "MylynConnector::Versions", :action => "all"
+ rmc.connect "mylyn/queries", :controller => "MylynConnector::Queries", :action => "all"
+ rmc.connect "mylyn/users", :controller => "MylynConnector::Users", :action => "all"
+ rmc.connect "mylyn/timeentryactivities", :controller => "MylynConnector::TimeEntryActivities", :action => "all"
+ rmc.connect "mylyn/trackers", :controller => "MylynConnector::Trackers", :action => "all"
+ rmc.connect "mylyn/issuestatus", :controller => "MylynConnector::IssueStatus", :action => "all"
+
+ #projects
+ rmc.connect "mylyn/projects", :controller => "MylynConnector::Projects", :action => "all"
# map.connect "mylyn/:project_id/search", :controller => "MylynConnector::Issues", :action => "query"
# map.connect "mylyn/search", :controller => "MylynConnector::Issues", :action => "query"
- map.connect "mylyn/issue/:id", :controller => "MylynConnector::Issues", :action => "show", :conditions => {:method => :get}
- map.connect "mylyn/issues/updatedsince", :controller => "MylynConnector::Issues", :action => "updated_since", :conditions => {:method => :get}
- map.connect "mylyn/issues/list", :controller => "MylynConnector::Issues", :action => "list", :conditions => {:method => :get}
+ rmc.connect "mylyn/issue/:id", :controller => "MylynConnector::Issues", :action => "show"
+ rmc.connect "mylyn/issues/updatedsince", :controller => "MylynConnector::Issues", :action => "updated_since"
+ rmc.connect "mylyn/issues/list", :controller => "MylynConnector::Issues", :action => "list"
+ end
- #Filter/Query
- map.connect "issues.:format", :controller => 'issues', :action => 'index', :conditions => {:method => :post}
end

0 comments on commit 9e57b94

Please sign in to comment.