Seriously. You’ll thank me later. What do I mean, exactly? Well, let’s say you’re working on a small Rails team. You decide to start using test/spec. Be dee dee. As usual, you gem install test-spec then Pistonize the plugin. You start writing specs and begin converting existing tests to specs. You’re on a tear. Nothing can stop you. Behavior is king. You commit your changes. You break the build. W
j-j-j-jQuery. It’s on everyone’s lips, right? You love it or you hate it, or you’ve never tried it but you love it, or you’ve never tried it but you super-hate it. Yeah, we know. Well, PJ and I launched FamSpam a bit ago and made the bold move of powering all the jabbascript with jQuery. We even wrote our own Facbeook-style lightbox library in jQuery (Facebox). So while this is a Ruby blog, indulg
Chris made migrations sexy. So sexy, in fact, that DHH committed a variation of his plugin to trunk. I’m not here to make things sexy. I’m here to make migrations drop-dead gorgeous. Remember that file that no one uses and normally leaves of subversion? No, not doc/README_FOR_APP. I’m talking about db/schema.rb of course. Turns out with this plugin I wrote, it’s the baddest file in your source cod
Damn, that new release of Hobo reminds me: those guys have got some nice looking migrations. Let’s take it a step further. Let’s bring sexy back. Let’s turn this: class UpdateYourFamily < ActiveRecord::Migration create_table :updates do |t| t.column :user_id, :integer t.column :group_id, :integer t.column :body, :text t.column :type, :string t.column :created_at, :datetime t.column :updated_at, :d
Supporting timezones is a pain in the ass, but it’s a necessary evil for some sites and there are two working solutions as I see it. Observe: caboose “the official way” why “the slick way” The first one involves a fair amount of setup including one gem and two plugins, and the second one is too slow. Err’s gonna give you a third option: zoned We take the best of both worlds and mash them together
Hey: Ruby is expressive. Super expressive. There are many methods which roll up repetitive tasks right there in the core classes. Let’s examine two some. Enumerable#select (and #detect) Say I have an array of ActiveRecord objects and I want to find all the objects for which book_type is Comic (as opposed to Novel). And I only want to call AR’s find once. books = Book.find(:all, :order => 'id desc'
I used to make mix tapes (CDs) back in high school all the time. There’s nothing quite like spending hours upon hours picking 75 minutes worth of songs that fit together, flow nicely, and make you look cool to girls. Different types, too. Like a ‘slow song’ mix tape or a ‘punk rock’ mix tape or even a ‘moody-instrumentals-only’ mix tape. My favorite was the Quake mix, best enjoyed while playing Qu
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く