Hi Rita,
Please, check the following steps:
1. If you created a custom RegistrationController, you have to set devise
routes to use it. Something like this:
<config/routes.rb>
devise_for :users, controllers: { registrations: "registrations" }
2.sign_up_params is a private method in devise source code. So make sure
that your method definition is inside a private section of you custom
controller as well.
private
def sign_up_params
(...)
end
I've written a blog post describing how my team extended devise's
RegistrationController
here<http://kakimotonline.com/2014/03/30/extending-devise-registrations-controller/>.
Hope it helps.
Cheers,
Fernando
On Wed, Apr 23, 2014 at 6:28 AM, Gustavo Caso <[email protected]> wrote:
> You need to override the devise strong params implementation inside your
> ApplicationController.
>
> We could use a simple before_filter to check if devise controller is been
> use.
> ```ruby
> class ApplicationController < ActionController::Base
> before_filter :configure_permitted_parameters, if: :devise_controller?
>
> private
> def configure_permitted_parameters
> devise_parameter_sanitazer.for(:sign_up){|u| u.permit(:first_name,
> :last_name, :birthday, :mobile, :password, :password_confirmation}
> end
> end
> ยดยดยด
>
> Hope that helps.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/b7bd8258-83bf-489c-a884-6520b3881878%40googlegroups.com<https://groups.google.com/d/msgid/rubyonrails-talk/b7bd8258-83bf-489c-a884-6520b3881878%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Fernando Kakimoto
http://www.twitter.com/nandokakimoto
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/CALKwU8X9CyMFO69whqS0j5BUmqygLi-AYNyuggEtYYcRnOm%2B_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.