This is params hash.

```
 {"message_id"=>"#<Comment::ActiveRecord_Associations_CollectionProxy:0x007fbae5f12a78>",
 "id"=>"1"} 

```

I have a scenario like messages has many comments. When i try to edit the commets of a message i get a error 

```
"Couldn't find Message with 'id'=#<Comment::ActiveRecord_Associations_CollectionProxy:0x007fbae5f12a78>"

```

and my edit method is given below

```
def edit
    @message = Message.find(params[:message_id])
    # @message = Message.find(3)
    @comment = @message.comments.find(params[:id])  
end

```