For some reason, one of my models in rails is returning nil when I call .new. This is only a problem in the controller. When I try on the console, it returns an object with nil attributes as I would expect. I suspect the problem is in my controller, but I have no idea.
This also happens when I call .all. Again, I can execute these commands manually from the command line without issue.
Here's the controller code:
EDIT: Looks like a few of my other models are acting the same way. This problem is clearly deeper than this controller/model. I'm still very new to rails, so I'm not sure where to look to debug this.
EDIT2: A wise friend of mine helped me figure out that the controller action isn't even being called. My before filter, however, is, but it is not redirecting. So somehow, the right controller is found, but the appropriate action isn't called.
My server log SAYS the right action is being processed, but the actual function body doesn't seem to execute.