Last active
August 29, 2015 14:06
-
-
Save mattjstar/9ad51ee17a7082021482 to your computer and use it in GitHub Desktop.
Devise Override
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
# routes.rb | |
devise_for :users, :path => '', :path_names => {:sign_in => 'login', :sign_out => 'logout'}, :controllers => { :registrations => 'registrations', :sessions => 'sessions' } | |
# registrations_controller.rb | |
class RegistrationsController < Devise::RegistrationsController | |
def create | |
if the token is present? | |
resource.user_group_id = #usergroupid | |
end | |
super | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment