Sessions[:history] - a few issues

Hi, ok. I have a few problems with my URL history. They are in my array, but what I’ve done was extract the slug from the link, and was able to use that to look up my product image uri.

It looks something like this…ie
[“https://res.cloudinary.com/dlfodsgbd/image/upload/v1590070578/TippingPoint/photo_not_available.png”]

Now, I was trying to wrap that in an image tag, but it has an extra [" and "] in the string? not sure why though. Anyways, I need to wrap that in an image tag or img src.

The other issue I’m facing, and I think i know how to deal with it but not so sure. I am now altering the session[:history] array, and cant compare that to links in my history because they’ve been altered. ( I want to display unique page views (no point in putting repeats in there))

So do I make a copy of the array and alter that or just a copy of the elements in the array and alter them? I wasn’t too certain either way.

Thanks in advance,
Joe

ok, solved it myself.
admin can delete the thread.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs