I’m using the Instagram API to get images with certain tags, but Rails said undefined method ‘images’ when I’m showing the images in the view.
Here’s the error Rails gives:
undefined method `images' for #<Array:0x007f9ee7460608>
Here’s the controller:
@photos = Instagram.tag_recent_media("cats")
Here’s the view source:
<% @photos.each do |photo| %>
<%= image_tag photo.images.standard_resolution.url %>
<% end %>
Looks like
imagesis an attribute of thedataattribute of@photos. Try this instead: