RailsConf 2012 – Was It Worth the Cost?

Well, another RailsConf event has come and gone, and I wasn’t there, damn it! Too bad, Austin is the only civilized city in Texas, and it’s pretty close to my location, but no luck. The usual restraints – time and money. Once again, I’m so glad I went to the first Rails conference in 2006 in Chicago on my own nickel. I think most of the people that attended RailsConf 2006 did the same. The event was held over the weekend, because none of us could justify a couple of days from our day jobs, which at the time was largely not Rails development. Probably the only people making money… Read More

Continue Reading

De-clutter Your Rails Views, Use Partials For JavaScript SEO

If your Marketing or SEO guy is out of control (and when are they not?), you may be finding yourself stuffing insane amounts of JavaScript into your Rails views in order to track page referrals, conversion rates and other Google or Yahoo SEO analytic data. Not good from an esthetic standpoint. The solution is to use partials to partition the JavaScript SEO stuff off into a corner. Plus, it’s easier to reuse. Say you need to add some JS optimization code that looks like this: Just create a _google_opt_file1.html.erb file under app/views/shared and then call it in your view with This kind of SEO script typically goes right before the… Read More

Continue Reading

Rails Time Extension Edge Case

I love the extensions that Rails has for the Ruby Time object (see ActiveSupport::CoreExtensions::Integer::Time) – you can do calculations like Time.now + 1.month, (4.months + 5.years).from_now, and other cool things. In my last post, I mentioned working with an application that uses a subscription service. One of the things I want to do is send the subscriber an e-mail when the current subscription is about to expire. (I am not comfortable with the concept of auto-renewal; customers should have the right to “opt in” on the continuation of a subscription. Just personal preference.) So I set up a cron job that tests subscription expiration dates. Here’s the one that checks… Read More

Continue Reading