Where do I put code for my own types?

Dave Smith wrote:

Sorry for all the questions today...

Bring'em on.

Beyond the obvious things--models, controllers, helpers, and other
framework-related types--where should I put the code for my own types?
For example, I was thinking of writing my own AJAX-friendly paginator,
but I don't know where to put the code for that sort of thing.

The /lib folder is for stuff that doesn't occupy the MVC triad.

I would prefer to keep things object-oriented, so I would rather do a
lot of work with classes (even if their lifespan is short during a
request) than use helper functions for everything.

These should become nested classes inside their classic MVC classes.
Use the lib folder for (roughly speaking) anything that could work
alone, without any Rails around it.

Does it belong in the /vendor directory?

Only if it's a plugin or otherwise from someone else.