##// END OF EJS Templates
Named routed for RSS/API keys (#20997)....
Jean-Philippe Lang -
r14295:486a4dfbc82a
parent child
Show More
@@ -15,13 +15,13
15 15 <% else %>
16 16 <%= l(:label_missing_feeds_access_key) %>
17 17 <% end %>
18 (<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)
18 (<%= link_to l(:button_reset), my_rss_key_path, :method => :post %>)
19 19 </p>
20 20
21 21 <% if Setting.rest_api_enabled? %>
22 22 <h4><%= l(:label_api_access_key) %></h4>
23 23 <div>
24 <%= link_to l(:button_show), {:action => 'show_api_key'}, :remote => true %>
24 <%= link_to l(:button_show), my_api_key_path, :remote => true %>
25 25 <pre id='api-access-key' class='autoscroll'></pre>
26 26 </div>
27 27 <%= javascript_tag("$('#api-access-key').hide();") %>
@@ -31,6 +31,6
31 31 <% else %>
32 32 <%= l(:label_missing_api_access_key) %>
33 33 <% end %>
34 (<%= link_to l(:button_reset), {:action => 'reset_api_key'}, :method => :post %>)
34 (<%= link_to l(:button_reset), my_api_key_path, :method => :post %>)
35 35 </p>
36 36 <% end %>
@@ -72,9 +72,9 Rails.application.routes.draw do
72 72 match 'my/account/destroy', :controller => 'my', :action => 'destroy', :via => [:get, :post]
73 73 match 'my/page', :controller => 'my', :action => 'page', :via => :get
74 74 match 'my', :controller => 'my', :action => 'index', :via => :get # Redirects to my/page
75 match 'my/reset_rss_key', :controller => 'my', :action => 'reset_rss_key', :via => :post
76 match 'my/reset_api_key', :controller => 'my', :action => 'reset_api_key', :via => :post
77 match 'my/api_key', :controller => 'my', :action => 'show_api_key', :via => :get
75 get 'my/api_key', :to => 'my#show_api_key', :as => 'my_api_key'
76 post 'my/api_key', :to => 'my#reset_api_key'
77 post 'my/rss_key', :to => 'my#reset_rss_key', :as => 'my_rss_key'
78 78 match 'my/password', :controller => 'my', :action => 'password', :via => [:get, :post]
79 79 match 'my/page_layout', :controller => 'my', :action => 'page_layout', :via => :get
80 80 match 'my/add_block', :controller => 'my', :action => 'add_block', :via => :post
@@ -28,9 +28,9 class RoutingMyTest < Redmine::RoutingTest
28 28 should_route 'GET /my/page' => 'my#page'
29 29 should_route 'GET /my' => 'my#index'
30 30
31 should_route 'POST /my/reset_rss_key' => 'my#reset_rss_key'
32 should_route 'POST /my/reset_api_key' => 'my#reset_api_key'
33 31 should_route 'GET /my/api_key' => 'my#show_api_key'
32 should_route 'POST /my/api_key' => 'my#reset_api_key'
33 should_route 'POST /my/rss_key' => 'my#reset_rss_key'
34 34
35 35 should_route 'GET /my/password' => 'my#password'
36 36 should_route 'POST /my/password' => 'my#password'
General Comments 0
You need to be logged in to leave comments. Login now