これは私の config/route.rb の工夫部分です:
devise_for :admin_utilisateurs, :path_names => { :sign_up => 'enregistrer',
:sign_in => 'connexion',
:sign_out => 'deconnexion',
:password => 'mot_de_passe',
:unlock => 'deverouiller'},
:path => 'identification'
この結果、次のようになりますrake routes
。
new_admin_utilisateur_session GET /identification/connexion(.:format) devise/sessions#new
admin_utilisateur_session POST /identification/connexion(.:format) devise/sessions#create
destroy_admin_utilisateur_session DELETE /identification/deconnexion(.:format) devise/sessions#destroy
admin_utilisateur_password POST /identification/mot_de_passe(.:format) devise/passwords#create
new_admin_utilisateur_password GET /identification/mot_de_passe/new(.:format) devise/passwords#new
edit_admin_utilisateur_password GET /identification/mot_de_passe/edit(.:format) devise/passwords#edit
PUT /identification/mot_de_passe(.:format) devise/passwords#update
cancel_admin_utilisateur_registration GET /identification/cancel(.:format) devise/registrations#cancel
admin_utilisateur_registration POST /identification(.:format) devise/registrations#create
new_admin_utilisateur_registration GET /identification/enregistrer(.:format) devise/registrations#new
edit_admin_utilisateur_registration GET /identification/edit(.:format) devise/registrations#edit
PUT /identification(.:format) devise/registrations#update
DELETE /identification(.:format) devise/registrations#destroy
admin_utilisateur_confirmation POST /identification/confirmation(.:format) devise/confirmations#create
new_admin_utilisateur_confirmation GET /identification/confirmation/new(.:format) devise/confirmations#new
GET /identification/confirmation(.:format) devise/confirmations#show
admin_utilisateur_unlock POST /identification/deverouiller(.:format) devise/unlocks#create
new_admin_utilisateur_unlock GET /identification/deverouiller/new(.:format) devise/unlocks#new
GET /identification/deverouiller(.:format) devise/unlocks#show
たとえば、ルートを変更するにはどうすればよいですか?
/identification/deverouiller/new
の中へ
/identification/deverouiller/nouveau
ハッシュに追加:new => 'nouveau'
すると、うまくいきません。:path_names
助けてくれてありがとう