Module: PermalinkFor::PrettyImpl::ClassMethods

Defined in:
lib/permalink_for/pretty_impl.rb

Instance Method Summary collapse

Instance Method Details

#find(id) ⇒ Object



14
15
16
17
18
# File 'lib/permalink_for/pretty_impl.rb', line 14

def find(id)
  position = permalink_configuration[:reverse] ? :last : :first
  id = id.split('-').send(position).to_i if id.is_a? String
  super id
end