0

I am going to use friendly_if gem for pretty urls. I am able to get the nice looking urls. However, I all the code in the controller was getting records by id. like so:

@image = Image.find(params[:id])

Do I need to start finding records by name now?

bonum_cete
  • 4,730
  • 6
  • 32
  • 56

1 Answers1

4
Image.friendly.find(params[:id])
Eyeslandic
  • 14,553
  • 13
  • 41
  • 54