photo_url(Photo.first, :host => 'foobar') returns http://foobar/photos/2vig0 .
How do I do the same thing with something like 'photo'_url(Photo.first, :host => 'foobar')
Do I need to do something like: 'photo'.constantize._url(Photo.first, :host => 'foobar')
You can use
sendto invoke a method, once you’ve concatinated the two parts of the string together.assuming
@fncontains the string"photo":Or, possibly clearer: