I wondering about the next:
The book Advance Rails states that using
@message = Message.find_by_user_id_and_id(current_user.id,
Should return RecordNotFound if the user that tries to view a message is
not the one that created it.
But what I get is:
You have a nil object when you didn’t expect it!
The error occurred while evaluating nil.sender_name
And that is fine since it gets to the view and the @message used there
But the find_by_user_id_and_id was not returning RecordNotFound. Which
is something I could use a common error page for.
I’m I missing something?