modified show_user_profile routes, added ajax route
This commit is contained in:
parent
8d46fe7843
commit
f7f71e9cc9
|
@ -17,7 +17,7 @@
|
|||
= current_user.screen_name
|
||||
%b.caret
|
||||
%ul.dropdown-menu
|
||||
%li= link_to "View profile", show_user_profile_at_path(current_user.screen_name)
|
||||
%li= link_to "View profile", show_user_profile_path(current_user.screen_name)
|
||||
%li= link_to "Settings", edit_user_registration_path
|
||||
%li.divider
|
||||
%li= link_to "Logout", destroy_user_session_path, method: :delete
|
||||
|
|
|
@ -22,8 +22,12 @@ Rails.application.routes.draw do
|
|||
|
||||
match '/settings/profile', to: 'user#edit', via: 'get', as: :edit_user_profile
|
||||
match '/settings/profile', to: 'user#update', via: 'patch', as: :update_user_profile
|
||||
|
||||
namespace :ajax do
|
||||
match '/ask', to: 'ajax#ask', via: :post, as: :ajax_ask
|
||||
end
|
||||
|
||||
match '/user/:username', to: 'user#show', via: 'get'
|
||||
match '/@:username', to: 'user#show', via: 'get', as: :show_user_profile_at
|
||||
match '/:username', to: 'user#show', via: 'get', as: :show_user_profile
|
||||
match '/@:username', to: 'user#show', via: 'get', as: :show_user_profile
|
||||
match '/:username', to: 'user#show', via: 'get', as: :show_user_profile_alt
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue