Posts Tagged ‘activerecord’

A voting extension from scratch for Rails 3 (Part 4 – models and migrations)

Better late than never … finally Part 4 of the blog series about developing MakeVoteable, a voting gem for Rails 3. In the last episode we took a deeper look how to get the logic inside our gem. In this episode we focus on the model this logic acts on. As we use ActiveRecord to [...]

A voting extension from scratch for Rails 3 (Part 2 – Testing environment)

In the last episode we created the basic structure for the make_voteable gem. With “test first” in mind we now set up our RSpec testing environment for developing the make_voteable gem. We already installed RSpec at the beginning of this blog series. First we need to create a testing folder (named spec) directly under the [...]

A voting extension from scratch for Rails 3 (Part 1 – Overview and setup)

This blog series is about creating a voting extension for Ruby On Rails. There are already some others voting extensions available, but none is currently up-to-date 1 or ActiveRecord compatible 2. So let’s build one from scratch. It is also (or maybe even more) a blueprint of current best practices on how to build those [...]