thoughts_on_rails

a blog about ruby on rails

Apps for Rails Developers

The App Store is full of useful mobile apps for developers… of mobile apps. Though Rails developers have a bit less to choose from, there are some great apps out there for us as well. Here are a few that I’m using right now.

Polymorphic Associations With Active Record

Model associations are one of the things that every new Ruby on Rails developer must understand in order to effectively use the framework. The concept behind these relationships is rather simple, and most people have little trouble grasping it once introduced. One of the sticking points (for me, at least) was polymorphic associations, or associations where a single model can belong to multiple types of other models.

Creating Plugins for Octopress

Octopress comes with quite a few plugins out of the box, covering everything from categories to video tags. Plugins are easy to create and can be used to extend Octopress in a variety of ways. Today we’ll learn how to extend the Liquid templating system with new tags of our own.

Devise and Omniauth

One of the great things about Devise is how easy it is to add Omniauth support. Omniauth is a library that standardizes authentication for a wide variety of services. Services are supported via strategies, which are implemented as Rack middleware and distributed as gems.

You’ll need to have Devise set up with a User model in order to begin. You can find instructions here if necessary. You’re also going to need to get signed up with whatever provider you choose to use. Once you’re registered and have your credentials, you can actually get to work.

Getting Started With Octopress

Welcome to my blog, thoughts_on_rails. I plan to put all sorts of useful stuff here, but we have to start somewhere. Where better than the blog itself? So, here’s my basic guide to setting up a blog just like this one.

This blog uses a really cool little gem called Octopress created by Brandon Mathis. It’s written in Ruby, based on Jekyll, and has absolutely nothing at all to do with Rails. I chose to use Octopress for this blog because of the git-based workflow and easy setup on Heroku. Here are the basic steps to get up and running, assuming you have a working install of Ruby 1.9.3.