In my users photo album page they see photos they have uploaded and each photo has a \'make default\' link on it.
When the user clicks make default
, then the id of
If you came from the photo_album page, you should be able to do:
redirect_to :back
Otherwise, you should be able to do a named route like:
redirect_to photo_album_path(photo.album_id) # or whatever the association key is
BTW, why do you have photo_albums mapping to photo_galleries? It's a lot less confusing if you named your resources and routes in a similiar manner. ie: if you wanted your route endpoints to use /photo_galleries you should name your resource PhotoGallery.