I'm playing around with ( teaching myself ) rails and I am using the following code

```
class HomeController < ApplicationController

    def index
        if user_signed_in?
            redirect_to :controller=>'dashboard', :action => 'index'
        end
    end
end

```

As a result of the code above when the user is logged in they get redirected to the 'dashboard' ( which is great) but they can't access the homepage. How can I fix this ? I'm still very new to ruby/rails so still getting acclimated with the syntax etc.

Thank you.