Reputation: 694
I'm applying a design for a Rails app, I usually works on PHP, anyway, I'm doing the reset password modifications the problem is I have the views for reset password, but not the email.
I know there is a generate devise:views
which pull up even the email, the problem when I do this is this "damage" the current customizations in some part already done in this app by other programmer.
How can I pull up just the reset instructions email view on devise, so I can edit it?
Thanks.. I guess you can be more specific when you generate views of devise using
generate devise:views
Even more specific than
generate devise:views users
Also in the email the link is directed to localhost, for this issue I found this Devise: edit_password_url in password reset email is sending users to url/api/v1/
The problem is I can't make that work in my routes.rb which is here
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
How in the name of rails can I make this work so that I can finish this?
Upvotes: 0
Views: 140
Reputation: 1266
Rails has some helpers that can come in useful when you do something wrong, such as
rails generate model Fish
rails g controller Fishes
You can also apply this to destroying the action task if you need too
rails destroy model Fish
rails destroy controller Fishes
You can apply this to anything with rails at the front so:
rails generate devise:views
rails destroy devise:views
Upvotes: 1