Iam using Devise + CanCan + Rolify in my app as the authorization and authentication solution.
The admin is doing all the user access management from their dashboard in my app. So Im trying to access all the Devise view links from within my "admin_dashboard.index.html file
Ive created a User controller in this app
Here is the admin_dashboard_index.html.erb file
<table id="users_index_table" %>
<tr>
<th>id</th>
<th>user name</th>
<th>user email</th>
<th>user role</th>
<th>reset password</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @users.each do |user| %>
<tr>
<td><%= user.name %></td>
<td><%= user.email %></td>
<td><%= user.roles %></td>
<th><%= link_to 'reset password', edit_user_password_path %></th>
<td><%= link_to %></td>
<td><%= link_to 'Show', user %></td>
<td><%= link_to 'Edit', edit_user_path(user) %></td>
<td><%= link_to 'Destroy', user, confirm: 'Are you sure?', method: :delete %></td>
</tr>
<% end %>
</table>
<%= link_to 'New User', new_user_registration_path %>
Now the problem is when I click on these "user" links all work except for the "new_user_registration_path". When I click this it leads me to the home page of the app and the rails server shows this trace:
Started GET "/users/sign_up" for 127.0.0.1 at 2012-06-16 18:24:49 -0700
Processing by Devise::RegistrationsController#new as HTML
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Redirected to http://localhost:3000/
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
How can I get the new user link to and the "edit_user_password_path" to work and route me to the appropriate fields as opposed to the home page.
Thanks