嗨我正在申请一个Rails应用程序的dessign,我通常在php上工作,无论如何,我正在做重置密码修改问题是我有重置密码的意见,但不是电子邮件..
我知道有一个generate devise:views
即使是电子邮件,我这样做的问题是这个“损坏”当前自定义在某个部分已由其他程序员在此应用程序中完成。
如何在设计中仅提取重置说明电子邮件视图,以便我可以编辑它?
谢谢..我猜你在使用
生成设计视图时会更具体generate devise:views
比
更具体generate devise:views users
同样在电子邮件中,该链接指向localhost,对于此问题,我发现了Devise: edit_password_url in password reset email is sending users to url/api/v1/
问题是我无法在我的路线中工作.rb就在这里
Consult::Application.routes.draw do
devise_for :users, :controllers => { :registrations => "registrations" }
scope "/admin" do
resources :users, :controller => 'admin/users'
end
resources :players
resources :player_steps
resources :coach_steps
resources :candidates
resource :payment_notifications, :only => :show
#match 'candidates' => 'candidates#index'
match '*a', :to => 'errors#routing'
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Sample resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
#root :to => "devise/sessions#new"
get 'user_type', to: 'home#user_type', as: :choose
devise_scope :user do
root :to => "devise/sessions#new"
end
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
# match ':controller(/:action(/:id))(.:format)'
end
如何以轨道的名义我可以使这项工作,所以我可以完成这个XD谢谢
答案 0 :(得分:1)
Rails有一些助手可以在你做错事时有用,例如
rails generate model Fish
rails g controller Fishes
如果您需要,也可以将其应用于销毁操作任务
rails destroy model Fish
rails destroy controller Fishes
你可以将它应用于前面带有导轨的任何东西,所以:
rails generate devise:views
rails destroy devise:views