Virtual Surreality

It's too real to be true

Browsing Posts in Reminder

Came across this twice in the past two weeks. How NOT to do it: $(‘form :submit’).click(function() { $(this).attr(“disabled”, true); $(this).val(“wait…”); $(this).addClass(“disabled”); }); Doing it the above way, the click event will indeed fire, but on some browsers the submit event will not. The event to bind to is submission of a form, not clicking of [...]

A little “remember me later” for conditionally deploying a Rails 3 app running on Ruby 1.9 on Heroku. $ruby_version = `ruby –version`.split[1].to_f source :rubygems source ‘http://gems.github.com’ gem ‘rails’, ‘~> 3.0.0′ gem ‘bson_ext’ gem ‘decent_exposure’ gem ‘haml’ gem ‘mongoid’ group :development, :test do if $ruby_version < 1.9 gem ‘ruby-debug’ else gem ‘ruby-debug-base19′, “0.11.24″ gem ‘ruby-debug19′, “0.11.6″ [...]