Authentication with devise and a separate controller (Users) that is a single \'show\' action
class UsersController < ApplicationController
#before_filter
I think this may help you.
In "Rails routing from the Outside in",
For example, you would like /profile to always show the profile of the currently logged in user. In this case, you can use a singular resource to map /profile (rather than /profile/:id) to the show action.
match "profile" => "users#show", :as => 'profile'
- <%= link_to "Profile", profile_path %>
That is for private profile page.
Since the public profile page will be different to private profile page, I would create a profiles controller to show public profiles.