module ActivePermalink::Querying

Public Instance Methods

find_by_slug(*args) click to toggle source
# File lib/active_permalink/querying.rb, line 14
def find_by_slug(*args)
  permalink_locator.locate(*args)
end
find_by_slug!(*args) click to toggle source
# File lib/active_permalink/querying.rb, line 18
def find_by_slug!(*args)
  permalink_locator.locate!(*args)
end
found_by_slug() click to toggle source
# File lib/active_permalink/querying.rb, line 23
def found_by_slug
  @found_by_slug
end
found_by_slug=(value) click to toggle source
# File lib/active_permalink/querying.rb, line 27
def found_by_slug=(value)
  @found_by_slug = value
end
found_by_slug?() click to toggle source
# File lib/active_permalink/querying.rb, line 31
def found_by_slug?
  found_by_slug.present?
end
needs_redirect?() click to toggle source
# File lib/active_permalink/querying.rb, line 35
def needs_redirect?
  found_by_slug? && found_by_slug != slug
end
with_slug(*args) click to toggle source
# File lib/active_permalink/querying.rb, line 10
def with_slug(*args)
  permalink_locator.scope(*args)
end