tap/app/helpers/application_helper.rb

19 lines
305 B
Ruby
Raw Normal View History

2014-12-09 12:10:36 +00:00
require 'digest/md5'
2014-11-06 13:46:59 +00:00
module ApplicationHelper
2014-12-09 12:10:36 +00:00
def get_color(user)
@color = Digest::MD5.hexdigest(user.name)[0..5]
end
def get_color_style(user)
2014-12-09 16:07:17 +00:00
@style = "background-color: #"+ get_color(user) +";"
2014-12-09 12:10:36 +00:00
end
2014-12-09 10:38:10 +00:00
#tijdelijk voor layout
def koelkast(status)
@koelkast ||= status
end
2014-12-09 12:10:36 +00:00
2014-11-06 13:46:59 +00:00
end