Revert "Randomize the ordering of clients displayed."

This reverts commit 6850fc8c83.
This commit is contained in:
Gregory Maxwell 2012-07-13 10:46:51 -04:00
parent 6850fc8c83
commit bc720e8459
2 changed files with 2 additions and 26 deletions

View file

@ -1,23 +0,0 @@
class Random < Liquid::Tag
Syntax = /(\w+[.]?\w+)\s+(\w+)/o
def initialize(tag_name, markup, tokens)
if markup =~ Syntax
@collection_name = $1
@randomized_name = $2
else
raise SyntaxError.new("Syntax Error in 'random' - Valid syntax: random [source] [var]")
end
super
end
def render(context)
collection = context[@collection_name]
collection = collection.sort_by{rand}
context[@randomized_name] = collection
return
end
end
Liquid::Template.register_tag('random', Random)