Nil Class

I’ve a field in my two db tables called “username”. when I try to match post author and current username for editing a post @movies.username==current.name in my moviescontroller. It showed nil class or method. Why this is showing??Any ideas??

Check what the values for both "@movies" and "current" are at this line. What are they?

If you don't know how to do that have a look at the Rails Guide on Debugging.

Colin