Module: Locomotive::Concerns::ContentEntry::NextPrevious

Included in:
Locomotive::ContentEntry
Defined in:
app/models/locomotive/concerns/content_entry/next_previous.rb

Instance Method Summary collapse

Instance Method Details

#nextObject

Return the next content entry based on the order defined in the parent content type.

Parameters:

  • The (Object)

    next content entry or nil if not found



10
11
12
# File 'app/models/locomotive/concerns/content_entry/next_previous.rb', line 10

def next
  next_or_previous :gt
end

#previousObject

Return the previous content entry based on the order defined in the parent content type.

Parameters:

  • The (Object)

    previous content entry or nil if not found



18
19
20
# File 'app/models/locomotive/concerns/content_entry/next_previous.rb', line 18

def previous
  next_or_previous :lt
end