gave the route a name, see modified controller. also documented it with example usage. let me know what you think about that.

pull/1186/head
Martin Linkhorst 12 years ago
parent f203f52310
commit 5d9b8a0523
  1. 2
      app/controllers/members_controller.rb
  2. 11
      config/routes.rb

@ -28,7 +28,7 @@ class MembersController < ApplicationController
respond_to do |format|
if members.present? && members.all? {|m| m.valid? }
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
format.html { redirect_to settings_project_path(@project, :tab => 'members') }
format.js {
render(:update) {|page|

@ -81,9 +81,18 @@ OpenProject::Application.routes.draw do
resources :projects do
member do
# this route let's you access the project specific settings (by tab)
#
# settings_project_path(@project)
# => "/projects/1/settings"
#
# settings_project_path(@project, :tab => 'members')
# => "/projects/1/settings/members"
#
get 'settings(/:tab)', :action => 'settings', :as => :settings
get 'copy'
post 'copy'
get 'settings(/:tab)', :action => "settings"
post 'modules'
post 'archive'
post 'unarchive'

Loading…
Cancel
Save