Rails 3 – Building a Blog – Part 1: Test Setup & Generators
Every good project needs a good setup. In this episode, I set up a github repo, create a new rails application, hook in Cucumber and Rspec, write a Cucumber feature, and write the code to make it...
View ArticleOAuth with the Twitter Gem
Twitter just turned off Basic Auth and is forcing application developer to use OAuth. Here is a demonstration of how to add Twitter OAuth to your Ruby on Rails Application. Download 90.9 MB Download...
View ArticleRails 3.0.3 Setup – Delicious Clone
Here is what I’ve done to create this application: Use the ‘rails new’ command to create a rails application Set up the Gemfile Configure the Database Install Cucumber Install Rspec Install Devise...
View ArticleBuilding a Rails Curriculum
A few weeks ago I was looking at Peter Cooper’s Ruby course and wound up proposing a Basic Ruby on Rails course. Interestingly enough, I’ve been named the instructor for the course. I’ve been working...
View ArticleSwitching to HAML – Delicious Clone
This is a quick demonstration of how to switch your Rails 3 application to HAML from ERB.
View ArticleCanCan: Setting Permissions – Delicious Clone
In this installment in the Delicious Clone, we use CanCan to set some permissions on the Bookmarks Controller. Next week, we’ll finish the bookmark creation process and the following, we’ll add...
View ArticleSingle Table Inheritance – Ruby on Rails Tutorial
Single Table Inheritance is a great way to handle related models that descend from the same class. The classic example is a Car class with Ford, Chevy, and Honda subclasses. This Ruby on Rails...
View ArticleCoffeeScript Basics – A Teach Me To Code Tutorial
CoffeeScript is now going to be a default installation with Ruby on Rails. So, I installed CoffeeScript and NodeJS and have been playing with it for the last hour or so. Here are the basics you need...
View ArticleRails 3.1 Beta – Sprockets, CoffeeScript, and JQuery – A Teach Me To Code...
Ruby on Rails 3.1 is moving to use Sprockets to compile CoffeeScript into JavaScript and include JQuery in it’s JavaScript by default. This is a quick demo of how it all hangs together to manage your...
View ArticleMany to Many Associations in Ruby on Rails – A Teach Me To Code Tutorial
I had several requests in UserVoice to provide a Many to Many tutorial in Rails. This is a demonstration of how to put together a “has and belongs to many” association and a “has many through”...
View ArticleFreelancing Advice – Teach Me To Code Podcast
I’ve had two people ask me about freelancing within 1 day of each other. So, I’m going to give some advice. I also talked about finding freelance clients a few weeks ago in this episode. Talk to other...
View ArticleBuilding a Star-Rating System in Ruby on Rails with jQuery
Specification Clicking a star rating turns on the stars to the left of the star I clicked. Clicking a star submits the star rating. When I refresh the page, the star ratings should be persistent....
View ArticlePivotal Labs’ Javascript Setup
One of my clients had Pivotal Labs build them a website. After Pivotal Labs finished the project, they helped them find a developer to maintain it for them. I took over from him. This last week, I had...
View ArticleCreate a ‘Like’ or ‘+1′ button with make_flaggable
With the recent release of the Google Plus beta (ask me for an invite if you want one), I felt it appropriate to show a simple way to create a Like or +1 button for your Rails application. The app and...
View Article