How to Remove/Disable Sign Up From Devise
<p>I'm trying to remove/disable the <code>user/sign_up</code> path from Devise. I'm doing this because I don't want random people gaining access to the application. I have it  partly working by  adding the following in routes.rb</p>
<pre><code>Rails.application.routes.draw do
  devise_scope :user do
    get &quot;/sign_in&quot; =&gt; &quot;devise/sessions#new&quot; # custom path to login/sign_in
    get &quot;/sign_up&quot; =&gt; &quot;devise/registrations#new&quot;, as: &quot;new_user_registration&quot; # custom path to sign_up/registration
  end

...

devise_for :users, :skip =&gt; :registration

end
</code></pre>
<p>However, this breaks <code>&lt;%= link_to &quot;Profile&quot;, edit_user_registration_path, class: &quot;btn btn-info btn-flat&quot; %&gt;</code></p>
<p>which I want to keep so that users can update their profile.
I know it's because of the <code>devise_for :users, :skip =&gt; :registration</code></p>
<p>Is there a solution for this issue?</p>
<p>Running</p>
<p>Devise (4.2.0, 4.1.1, 4.1.0)</p>
<p>Rails 4.2.5</p>
<p>ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]</p>