Subscribe to my Feed, follow me on Twitter, recommend me on Working With Rails or see my code on GitHub
Ready to take my clothes off
April 9 is CSS Naked Day. Here’s a simple Rails helper that determines if Time.now is naked day:
def naked_day?(day=9, month=4)
start = Time.utc(Time.now.year, month, day) - 12.hours
stop = Time.utc(Time.now.year, month, day) + 36.hours
now = Time.now.utc
now > start && now < stop
end
(Naked day lasts for 48 hours, 24 + 1 hour for each timezone)
Put it in application_helper.rb, and you can use it in your layout like this:
<head>
<% unless naked_day? -%>
<%= stylesheet_link_tag 'application' %>
<% end -%>
</head>

Comments
Atom feed
By Re at Tue 26 Jan 00:36
Some people get know that that’s more simple to order the legal dissertation or <a href=“http://www.topthesis.com”>thesis writing</a> related to this post, than to make by own efforts.
Leave a comment