hmm I did use nested resource  and I have     @grocery_item = @grocery_list.grocery_items.new(grocery_item_params) with   if @grocery_item.save on the following line.   and so I removed {:value => @grocery_list.id}  and it works. I guess time to make another commit