I know how to override the default controllers, and it works, but now I need to add a new action to the registration controller.
I need to update user fields. I need to add the first and last name in this form, but I do not want to use the standard editing page, because it will be a separate page.
I need another page. I have paypal..html.erb in my registration folder, but I cannot do this from the action in the regustrations controller.
Paypal Action:
class RegistrationsController < Devise::RegistrationsController def paypal end ... end
routes.rb:
devise_for :users, :controllers => {:registrations => 'registrations', :sessions => 'sessions'} do match 'paypal' => 'registrations#paypal' end
but somehow it displays a new log file. Here is the error:
NoMethodError in Registrations#paypal Showing C:/1508/app/views/devise/registrations/new.html.erb where line #22 raised:
How can I use the update form for this and what am I doing wrong?
override ruby-on-rails devise
MID
source share