Paged Scopes == More Awesome

Aron posted this 8 months ago | 0 comments

Updated my code based on Matt's follow-up post.

Adding the :paged option to a resource is a really nice little convenience. It's something we always need to do in order to generate clean URLs that you can page cache. Very, very nice.

Looking forward to more.

Paged Scopes == Awesome

Aron posted this 8 months ago | 3 comments

I've never really loved the will_paginate plugin. Sure, it works right out of the box. And if you stick to the defaults, it's falling-down simple. But that's always been my problem with it: What if I don't want the defaults?

Sure, will_paginate can be modified and customized pretty much any way you want, and we've done so many, many times. But for me, it always felt a bit too abstracted, a bit too opaque.

Enter Paged Scopes, a clever little gem that makes pagination a whole lot cleaner and clearer in my opinion.

What the gem does is very simple: It extends ActiveRecord's already incredibly powerful named scopes by adding pagination- ...

Nginx + Passenger: Easy as pie

Aron posted this 9 months ago | 0 comments

Redid the old slice this a.m., this time with Rails on Passenger and the lightweight web server Nginx. It could absolutely not have been simpler.

Have to hand it to the Phusion guys: Passenger just keeps getting better and better.

Why did I decide to move from Apache to Nginx? We're thinking of moving to an Nginx stack at work, so I figured I'd give it a whirl to see if there are any obvious problems. None so far. And a quick ab benchmarking shows the old blog is purring along faster than before.

Plus, it has a cool-as-hell logo:

Nginx

More to come.

About

Aron's Head in Death Valley

I'm Aron Pilhofer and this here is my website. And by website, I really do mean mine.

I wrote it from scratch in Ruby on Rails. I did most of the CSS, so if it's not semantic and standards-based, now you know why. I started with a lovely two-column layout from Matthew James Taylor and went from there.

I also work for The New York Times. If you want more of a bio, check my Linkedin profile or find me on Twitter. You can contact me directly at: aron [at] nytimes [dot] com

Smart People

Derek Willis
Chase Davis
Matt Waite
Charles Brian Quinn
Jacob Harris

Projects

What's Saving Journalism?
EZPolls
Fuel Dump
Scraping

Training

Rails Class, ONA

Feed

IE6 Sucks