Hi Everyone, I’m currently working on a practice blog project of sorts
and wanted to add an image to each of my posts. I’ve downloaded
file_column and installed it since it seems like a good solution for
what I want to do.
My problem is that when I called url_for_filecolumn it returns the wrong
url to my images. If the image is located at
localhost:3000/public/post/image/16/image.jpg file column returns
localhost:3000/public/development/post/image/16/image.jpg. I tried
switching the env setting to “production” instead but that just changed
it to localhost:3000/public/production/post/image/16/image.jpg.
Also does anyone know how to confirm that it will not return nil if you
call it? My app keeps crashing when it passes nil to .to_url (sic)
instead of telling me it’s nil. I tried checking if post.image was nil
but that didn’t really help either.
Thanks for your help, I’m sure there’s something simple I don’t know
since I just started out.