lib/friendly_id/sequentially_slugged.rb
# Return the unnumbered (shortest) slug first, followed by the numbered ones
# in ascending order.
Return the unnumbered (shortest) slug first, followed by the numbered ones
in ascending order.
Return the unnumbered ( shortest ) slug first followed by the numbered ones in ascending order .
def ordering_query
        length_command = "LENGTH"
        length_command = "LEN" if scope.connection.adapter_name =~ /sqlserver/i
        "#{length_command}(#{slug_column}) ASC, #{slug_column} ASC"
      end
def ordering_query length_command = "LENGTH" length_command = "LEN" if scope . connection . adapter_name =~ / sqlserver /i "#{length_command}(#{slug_column}) ASC, #{slug_column} ASC" end
Return the unnumbered (shortest) slug first, followed by the numbered ones
in ascending order.
Return the unnumbered ( shortest ) slug first followed by the numbered ones in ascending order .