Created
July 22, 2016 18:21
-
-
Save alexbrinkman/7e35be7b058163bc4761c0a82bbf8afb to your computer and use it in GitHub Desktop.
medium-open-closed-principle-within-devise-example2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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