Note that there are some explanatory texts on larger screens.

plurals
  1. PODevise undefined method `users_url' for #<Devise::RegistrationsController:0x00000003b299b0>
    text
    copied!<p>I get this error with devise registration:</p> <pre><code>undefined method `users_url' for #&lt;Devise::RegistrationsController:0x00000003b299b0&gt; </code></pre> <p>With Omniauth facebook, login, everything works fine.</p> <pre><code>class User &lt; ActiveRecord::Base has_one :profile, :dependent =&gt; :destroy after_save :myprofile def myprofile if self.profile else Profile.create(user_id: self.id, user_name: self.name) end end end class Profile &lt; ActiveRecord::Base belongs_to :user end </code></pre> <p>What could be the solution to get this working with devise registration?</p> <p>Important: It <strong>works with omniauth facebook</strong>, but it <strong>doesn't work with devise</strong> registration.</p> <p>Edit: i get this error with Profile.create! method:</p> <pre><code>NoMethodError - undefined method `users_url' for #&lt;Devise::RegistrationsController:0x00000005946e20&gt;: actionpack (3.2.13) lib/action_dispatch/routing/polymorphic_routes.rb:129:in `polymorphic_url' actionpack (3.2.13) lib/action_dispatch/routing/url_for.rb:150:in `url_for' actionpack (3.2.13) lib/action_controller/metal/redirecting.rb:105:in `_compute_redirect_to_location' actionpack (3.2.13) lib/action_controller/metal/redirecting.rb:74:in `redirect_to' actionpack (3.2.13) lib/action_controller/metal/flash.rb:25:in `redirect_to' </code></pre> <p>Edit_2: <strong>Github repo:</strong> <a href="https://github.com/gwuix2/anabol" rel="nofollow">https://github.com/gwuix2/anabol</a></p> <p>Github issue:</p> <p><a href="https://github.com/plataformatec/devise/issues/2457" rel="nofollow">https://github.com/plataformatec/devise/issues/2457</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload