# Sessions\[:history\] - a few issues

**URL:** <https://www.ruby-forum.com/t/sessions-history-a-few-issues/260767>\
**Category:** Uncategorized\
**Created:** [January 5, 2021, 3:02pm UTC](https://www.ruby-forum.com/t/sessions-history-a-few-issues/260767 "2021-01-05T15:02:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![merlin2049er](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@merlin2049er](https://www.ruby-forum.com/u/merlin2049er)\
**Post date:** [January 5, 2021, 3:02pm UTC](https://www.ruby-forum.com/t/sessions-history-a-few-issues/260767/1 "2021-01-05T15:02:49Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![merlin2049er](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@merlin2049er](https://www.ruby-forum.com/u/merlin2049er)\
**Post date:** [January 5, 2021, 7:26pm UTC](https://www.ruby-forum.com/t/sessions-history-a-few-issues/260767/3 "2021-01-05T19:26:19Z")

</div>

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