Controller unable to access model in production

I am trying to launch my rails app but when i launch the server in
production mode my sessions controller cannot access my user controller.
How do I fix this relationship not being set?

The problem is, in my sessions controller I can’t instantiate User (e.g.
User.find.authenticate (for has_secure_password))

Any ideas??

I am trying to launch my rails app but when i launch the server in
production mode my sessions controller cannot access my user controller.
How do I fix this relationship not being set?

The problem is, in my sessions controller I can’t instantiate User (e.g.
User.find.authenticate (for has_secure_password))

Any ideas??

I think you mean that your SessionsController cannot access your User
*model. *

It should have access to your User model, so, what error/output do you
see
in your development.log?

By the way the example you are providing isn’t a valid Rails statement:
User.find needs an argument, so it has to be something like:
User.find(id).authenticate at least.

On Thursday, January 2, 2014 11:06:53 PM UTC, Cameron C. wrote:

I am trying to launch my rails app but when i launch the server in
production mode my sessions controller cannot access my user controller.
How do I fix this relationship not being set?

The problem is, in my sessions controller I can’t instantiate User (e.g.
User.find.authenticate (for has_secure_password))

There is no relationship between controllers. What exactly happens (eg
what
exception is thrown) ?

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs