Archive for September, 2007

Now if you’re a regular user of Firefox, you’ve probably already had the opportunity to be dismayed by how you cannot copy and paste text with newlines into the search bar. All you end up with is the first line of text. I just end up typing in the search terms myself or copy and […]

Edge Rails now comes with a helper for creating form labels, so in your views, instead of doing this: <% form_for(:user, @user, :url => user_path(@user)) do |f| -%> <label for=”user_login”>Login</label> <%= f.text_field :login %> <end> where the <label> is given a for attribute of user_login (since the convention for form input ids is {MODEL_NAME}_{ATTRIBUTE_NAME}), you […]

Converting ActiveRecord instances to their JSON representation has always been a topic that has been dear to me. I’d tried to get a patch that adds to_json to ActiveRecord into Rails (but the quality of my patch was lacking in a few respects). The Jsonifier plugin that I wrote tried to address the lack of […]

Note to self: When a table column has a default value, such as for the type_category column/attribute like so: t.string :type_category, :limit => 20, :nil => false, :default => ‘tv’ a new instance of your ActiveRecord model will try and set the defaults from the database. Meaning: Anime.new => #<Anime id: nil, type_category: “tv”… Courtesy […]

This is not exactly a new change to Firefox 3’s nightly builds since the bugs have been setting in my browser tab bar for about a week but I figured I’d write about them anyway since it’s quite a nice improvement. What’s new? Download Resume – now you can pause and resume your downloads in […]