class Lookbook::EntityCollection

def previous(entity)

def previous(entity)
  index = entities.find_index { |i| i.lookup_path == entity.lookup_path }
  entities[index - 1] if !index.nil? && index > 0
end