Skip to content

Devise Invitable with Strong Parameters

André Costa edited this page Jan 9, 2018 · 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.

class Users::InvitationsController < Devise::InvitationsController
   private
   def update_resource_params
     params.require(:user).permit(:name, :email,:invitation_token, :your_params_here)
   end
end