I have a newbie question:
I’m storing a default URL (pointing to an image that’s stored on server) as the default image for a model, such as /assets/project_default.png. The user can also set the URL to a remote URL as well.
How do I display the URL as an absolute URL so it’s http://xxxxxx.com//assets/project_default.png but also support a user’s remote URL?
If I use "#{request.protocol}#{request.host_with_port}, that’ll always apply. I’d like to apply only if the URL isn’t remote.
Cheers,
Assuming I’m reading your question right, you could do something like…
application_helper.rb
Or add it into the model, etc.