Created
July 25, 2012 02:23
-
-
Save vincentopensourcetaiwan/3174002 to your computer and use it in GitHub Desktop.
Devise before filter that prevents access to “new_user_registration_path” unless user is signed-in
This file contains 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
#/ app / controllers / registrations_controller.rb | |
class RegistrationsController < Devise::RegistrationsController | |
before_filter :authenticate_user! | |
end |
This file contains 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
#/ config / routes.rb | |
devise_for :users, :controllers => { :registrations => 'registrations'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment