Displaying nice relative dates
<%= relative_time(Time.now) %>
# today
<%= relative_time(1.day.ago) %>
# yesterday
<%= relative_time(1.day.from_now) %>
# tomorrow
<%= relative_time_span([Time.now, 5.days.from_now]) %>
# May 17th - 22nd
Dealing with Subscription Payments
I’ve received numerous questions about how Lighthouse is handling subscriptions. It’s not like subscription schemes are new or anything, but I suppose having more case studies out there can be beneficial.
Your requests are safe with us
Sometime during the development of Lighthouse I did a bit of reading on web security issues, specifically CSRF attacks. CSRF attacks were a bit tough to grasp at first, because that’s just how the web works. Basically, a page can make a request to another server in your name. They even use your own cookies to authenticate for protected actions. So, how do you prevent these requests to your application?


