box-o-sand/cookbook/015/hodgepodge/app/helpers/list_helper.rb

10 lines
174 B
Ruby
Raw Normal View History

require 'sha1'
2011-08-11 02:06:36 +00:00
module ListHelper
def create_li(item, i)
%{<li class="#{ i % 2 == 0 ? 'even' : 'odd' }">#{i}:
#{SHA1.new(item.object_id.to_s)}</li>}
end
2011-08-11 02:06:36 +00:00
end