Skip to content

Instantly share code, notes, and snippets.

@alexbrinkman
Created July 22, 2016 18:21
Show Gist options
  • Save alexbrinkman/7e35be7b058163bc4761c0a82bbf8afb to your computer and use it in GitHub Desktop.
Save alexbrinkman/7e35be7b058163bc4761c0a82bbf8afb to your computer and use it in GitHub Desktop.
medium-open-closed-principle-within-devise-example2
class RegistrationsController < Devise::RegistrationsController
def create
super do
resource.add_role(:moderator)
resource.save
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment