How to remove API logic from view in Rails Way?

I would like to remove this logic:


from view.

I dont have model Hotel. I get this url via API using Suitcase gem.

I forgot pase code:

Problem is because hotel is from @hotels = Suitcase::Hotel.find(location: "%#{headed}%") and API recevie me images only if do Suitcase::Hotel.find(id: