What does ‘yield resource’ in the Devise controllers do?

It’s to allow subclasses to reuse the create implementation provided by devise, but being able to hook into the process.

For example you might have something like

class MyRegistrations < Devise::RegistrationsController
  def create
     super { |resource| ... }
  end
end

Leave a Comment

tech