]> git.openstreetmap.org Git - rails.git/commitdiff
Moved oauth_clients page to a sub-page of the user - makes it more obvious that the...
authorMatt Amos <zerebubuth@gmail.com>
Tue, 4 Aug 2009 13:07:11 +0000 (13:07 +0000)
committerMatt Amos <zerebubuth@gmail.com>
Tue, 4 Aug 2009 13:07:11 +0000 (13:07 +0000)
app/views/oauth_clients/edit.html.erb
app/views/oauth_clients/show.html.erb
config/routes.rb

index d3b2c8c8ad915aa55bdd5fecabbb15c8bf97c73a..855fc03d85b6ae1e625426c22098f65cafb07f1f 100644 (file)
@@ -1,5 +1,5 @@
 <h1><%= t'oauth.client_application.edit.title' %></h1>
-<% form_for :client_application, @client_application, :url => oauth_client_path(@client_application), :html => { :method => :put } do |f| %>
+<% form_for :client_application, @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %>
        <%= render :partial => "form", :locals => { :f => f } %>
        <br/>
        <%= submit_tag t'oauth.client_application.edit.submit' %>
index 281af522278b79bef6eda189c58c22ded0968672..df8fbc2481b01d3a3db975b939c6653fef39d6eb 100644 (file)
@@ -24,5 +24,5 @@
 
 <p><%= t'oauth.client_application.show.support_notice' %></p>
 
-<p><%= link_to t('oauth.client_application.show.edit'), edit_oauth_client_url(@client_application) %></p>
+<p><%= link_to t('oauth.client_application.show.edit'), edit_oauth_client_url(@client_application.user.display_name, @client_application) %></p>
 
index 0ce2f051dcf915daad974f601849af2c19494df4..0bc0d8cd390f17c2bc222730fbfd11f4fc67fcdc 100644 (file)
@@ -196,7 +196,7 @@ ActionController::Routing::Routes.draw do |map|
   map.connect '/message/delete/:message_id', :controller => 'message', :action => 'delete'
 
   # oauth admin pages (i.e: for setting up new clients, etc...)
-  map.resources :oauth_clients
+  map.resources :oauth_clients, :path_prefix => '/user/:display_name'
   map.connect '/oauth/revoke', :controller => 'oauth', :action => 'revoke'
   map.authorize '/oauth/authorize', :controller => 'oauth', :action => 'oauthorize'
   map.request_token '/oauth/request_token', :controller => 'oauth', :action => 'request_token'