Ruby has a gotcha when using setters on the same object: You have to use the syntax self.setter = value
. Otherwise, ruby thinks you are creating a local variable.
So, on your case, you would need to change your code to:
self.resp = movie.hash_attributes_for_movie_details(current_user)
Yes, it is a bit annoying, but it is a tradeoff we have to pay to have the syntax for local variables and for methods to be the same.