Posts tagged as:

rails 3

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 concept is pretty simple, so I won’t worry about posting the code below.

Install:

gem 'make_flaggable', :git => 'git://github.com/cavneb/make_flaggable.git'
bundle install
rails generate make_flaggable
rake db:migrate

Models:

class Article < ActiveRecord::Base
  make_flaggable :like
end

class User < ActiveRecord::Base
  make_flagger
end

Links:

https://github.com/medihack/make_flaggable
https://github.com/cavneb/make_flaggable

Download 93.4 MB
Download (iPod & iPhone) 43.9 MB

{ 6 comments }

 

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 Tutorial provides an example and explains how Rails puts all of the information in the same database table and allows you to query things from both the superclass and subclass.

Download 59.5 MB
Download (iPod and iPhone) 36.3 MB

{ 2 comments }

Here is what I’ve done to create this application:

  1. Use the ‘rails new’ command to create a rails application
  2. Set up the Gemfile
  3. Configure the Database
  4. Install Cucumber
  5. Install Rspec
  6. Install Devise
  7. Install CanCan
  8. Install jQuery
  9. Configure Devise

Download (HD) 84.2 MB
Download (iPod & iPhone) 47.4 MB

{ 37 comments }



This is the continuation of the Rails 3 Build a Blog series. This episode includes implementation of the Edit and Destroy methods on the Posts Controller. There are a lot of things left to cover on Rails 3, but this gets you the basics of the MVC framework and how to use Cucumber to build your application using BDD.

Download 361.3 MB
Download (iPhone/iPod) 79.9 MB

{ 22 comments }


The second part of the tutorial for building a blog with Ruby on Rails version 3. We demonstrate how to set up some basic routes, manage the controller and views, and create a basic form for creating posts.
Download 161.4 MB
Download (iphone & ipod) 65.8 MB

{ 8 comments }


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 pass.
Download 142 MB
Download (iphone & ipod) 59 MB

{ 27 comments }

In this episode, Chad discusses how he broke out of a comfortable job as a forklift operator, which ultimately led to him becoming a programmer.

He discusses his job, Ruby Central, and the Pragmatic Studio as contributions he makes to the community.

We also discuss the ebb and flow of passion for programming and how to avoid burnout on the things that we love. [click to continue…]

{ 4 comments }

This week I interviewed Chad Fowler. He and several others have helped organize Ruby conferences around the world, most notably RailsConf, RubyConf, and RubyConf India. He has also written The Passionate Programmer and Rails Recipes. Finally, he has contributed to open source projects like RubyGems and Facebooker.
[click to continue…]

{ 1 comment }

Loading multiple Ruby Gems can result in runtime errors when an incompatible version of a gem dependency is already loaded as a dependency of another gem.

Gem bundler can also pre-load and cache gems for faster loading.

Having two gems that require different versions of the same dependency can sometimes cause runtime errors. Yehuda Katz and Carl Lerche have created an elegant solution in the Gem Bundler.
Download 108.8 MB
Download (iphone & ipod) 48.8 MB

{ 0 comments }

In this interview with Pratik, we discuss several things, including:

Download this Episode

{ 1 comment }