class Lookbook::Collection
def find_previous(item)
def find_previous(item) index = ordered_entities.find_index { |i| i.lookup_path == item.lookup_path } ordered_entities[index - 1] if !index.nil? && index > 0 end
def find_previous(item) index = ordered_entities.find_index { |i| i.lookup_path == item.lookup_path } ordered_entities[index - 1] if !index.nil? && index > 0 end