Matthew Rogers wrote:
the if(params[:id] == p.id) never seems to evaluate to true.
What am I missing? Is there a better way to do this? Thanks!
You do not have access to the params hash in the browser. The params hash sends user-entered data to the server and is constructed by the browser when a request is sent. The inverse mechanism in Rails is instance variables. They are used by Rails to construct the page sent by the server to respond to the browser's request.