Posts Tagged ‘rails’

Phusion passenger calls home

Friday, May 14th, 2010

While on a ship at sea with slow (sometimes no) internet, I was developing a Ruby on Rails application for local (onboard/intranet) use. I discovered that Phusion passenger (modrails) calls home. This error layout file:

/usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/templates/error_layout.html.erb

has a stylesheet link to modrails.org

Theoretically this layout will happen only in development, because we all completely test our code, but you may want to comment the offending everywhere you have it installed. At best this is rather annoying on slow connections or disconnected laptops. At worst, it’s some devious tracking of modrails users.

The image link could be removed with no loss of functionality. To maintain the “prettiness”, it could be loaded as a data URI although older browsers don’t recognize that. In any case, the developers are rather uninterested in changing.

Rails logged_in_user idiom

Tuesday, October 7th, 2008

I recently refactored another developer’s code to clean up some massive amounts of database pings to retrieve the current user object. The main problem was in the use of the logged_in_user or current_user idiom in Rails. Several places give good examples but leave out the details that were bugging my project.
(more…)