Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Mark Paik
3,915 PointsRuby: Devise - when I hit the sign up button it leads me back to the localhost page
I am new to this, the only "sign up" I see is
<h2>Sign up</h2>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> <%= devise_error_messages! %>
<div><%= f.label :first_name %><br /> <%= f.text_field :first_name %></div>
<div><%= f.label :last_name %><br /> <%= f.text_field :last_name %></div>
<div><%= f.label :profile_name %><br /> <%= f.text_field :profile_name %></div>
<div><%= f.label :email %><br /> <%= f.email_field :email, :autofocus => true %></div>
<div><%= f.label :password %><br /> <%= f.password_field :password %></div>
<div><%= f.label :password_confirmation %><br /> <%= f.password_field :password_confirmation %></div>
<div><%= f.submit "Sign up" %></div> <% end %>
<%= render "devise/shared/links" %>
But I don't know how to fix this, can someone please assist? Thank you. I want to be able to continue, but I want to make sure this is solved.
1 Answer
Richard Crawford-Wilson
6,094 Pointsby default, devise will return you to whatever you set the root route as. I cant remember what part of it it is covered in but your instructed to set the root like this.
root to: 'statuses#index'
That means when someone access the root of your site (e.g. '/' or 'localhost') they get redirected to the index action on the statuses controller. Try changing this value and see where you get redirected to then.
Sorry for the double post. Can't edit
Richard Crawford-Wilson
6,094 PointsRichard Crawford-Wilson
6,094 Pointsby default, devise will return you to whatever you set the root route as. I cant remember what part of it it is covered in but your instructed to set the root like this.
root to: 'statuses#index'That means when someone access the root of your site (e.g. '/' or 'localhost') they get redirected to the index action on the statuses controller. Try changing this value and see where you get redirected to then.