Fixed undefined model through coffeescript scopes