Question: I am learning Rails following a udemy tutorial. Everything was good until this [error](http://i.stack.imgur.com/cbw1M.png), I keep rewinding the video and watched it over and over following the exact steps but somehow I always end up with this error. 

Please help me the udemy forum as that course is not active at all so I am frustrated.

[this my view page](http://i.stack.imgur.com/hnvZq.png), this page is really weird with all these rules

Answer: 
Your best bet is to use the `$rootScope`. This, as the name implies, correspond to the root scope of your application and is therefore potentially available (via DI) in any of your controllers. All you need to do is add `$rootScope` as a DI dependency in each of your controllers that requires it:

```
function MyCtrl($scope, $rootScope {
  $rootScope...
}

```

In your templates, the `$rootScope` always available by referencing `$root` in an angular expression.

You would do something like this:

```
<p>{{$root.is_logged_in}}</p>

```
Change to this:

```
$rootScope.is_logged_in = IsLoggedInService.IsLoggedIn();

```