For the table display of the restaurants, you get an edit and destroy link for every line following the sample code in the Rails Guide. If you took the Edit and Destroy out of the loop and had only one of each on the page, how could you get the index of a selected row so that it could be passed to the edit and destroy functions?
My table display looks like this:
Name Description Street Address City State Zip Code Phone Number
name1 d1 s1 c1 st1 z1 p1 Edit Destroy
n2 d2 sa2 c2 s2 z2 p2 Edit Destroy
For the table display of the restaurants, you get an edit and destroy link for every line following the sample code in the Rails Guide. If you took the Edit and Destroy out of the loop and had only one of each on the page, how could you get the index of a selected row so that it could be passed to the edit and destroy functions?
My table display looks like this:
Name Description Street Address City State Zip Code Phone Number name1 d1 s1 c1 st1 z1 p1 Edit Destroy n2 d2 sa2 c2 s2 z2 p2 Edit Destroy