Skip to content

Devise Invitable with Strong Parameters

amalagaura edited this page Dec 23, 2012 · 7 revisions

Invitable gem uses 'resource_params' method in the controller methods to parse the params for all the actions (including new). So customizing the controller is straightforward, need to adjust if your resource is not :user, I am not sure how to detect this, resource does not work.

class Users::InvitationsController < Devise::InvitationsController
   private
   def resource_params
     params.permit(user: [:name, :email, :your_params_here])[:user]
   end
end