model

Getting Started With MongoMapper and Rails

In which I show how to get up and running with MongoMapper and Rails in both text and video formats.

I have had a few requests for tips on getting started with MongoDB and Rails so I thought I would drop some quick knowledge. It is actually really easy to get going, but Rails always does everything for you so when something comes along that doesn’t, you sometimes feel lost.

Getting rails to play with a legacy Oracle database

Just recently I’ve had to do a lot of work getting rails to play with a 15 year old Oracle database. Needless to say this database doesn’t follow the conventions we’ve all grown used to with rails. The table names are all over the place, the primary keys aren’t surrogate keys but actually have business meaning, composite keys which include date columns, crazy methods of generating primary keys instead of sequences….. if there’s a rails convention this thing doesn’t break then I’ve not found it yet!

Password Resets Using ActiveUrl

In my previous article I described my ActiveUrl gem for Ruby on Rails applications, using a new-user registration page as an example. Let’s take a look at another application of the library – implementing a “reset password” function. Basically, we want to allow an user to change his/her password without logging in. We’ll achieve this by sending the secret URL to the user when they submit a “forgot your password?” form.

Select Random Records

I wanted for some reason to have random records from a model without any condition, just random records and here’s how you have to do it.

Rails 2.0 and Scaffolding Step by Step

Rails 2.0 step by step.

ActiveTest::Redesign < ActiveTest::Examination

The following is taken straight from the first two sections of the ActiveTest Redesign Draft. Feel free to comment, ask for features, steer me away from the unnecessary or just say you’re interested.

1.0: ADDRESSING A NEED

This section takes a cursory look at the evolution of ActiveTest.

1.1: The Original Premise

I originally started writing ActiveTest to address problems I had with Test::Unit. It lacked the following for my projects:

Syndicate content