Quantcast
Channel: Teach Me To Code » Ruby on Rails
Browsing all 34 articles
Browse latest View live

Ruby on Rails: Getting Started Part I

Most people are fairly familiar with the basic idea of a database driven website. More specifically, they understand that data is stored in the database and somehow makes it into the web page the...

View Article



Ruby on Rails: Getting Started Part II — Controllers

When I started writing part II, I started writing about models. As I got a little further along, I realized that it would be more helpful to provide an overview of the controller, which provides the...

View Article

Installing Phusion Passenger on Debian Etch

I really have enjoyed working with phusion passenger. It’s made rails setup and deployment a breeze. I did have a little trouble getting it running on my server the other day, though. Here’s what I had...

View Article

content_for: Multiple yields in the same layout

Have you ever wished you could call yield multiple times in the same layout in order to get extra stylesheets, javascript, or a dynamic sidebar? Having worked on several projects that needed this soft...

View Article

Rails Metal Example #1: Authentication

Last week, I wrote a post listing 9 ways to use rails metal. This is an explanation of the first way to use Rails Metal: Check Authentication. We’re setting up this Rails Metal to handle two scenarios:...

View Article


Image may be NSFW.
Clik here to view.

Ruby on Rails: Getting Started Part III — Models

Rails Developers do it with Models I saw a t-shirt at Mountain West RubyConf this year that said “Rails Developers do it with Models.” Of course, they were talking about the classes we use to access...

View Article

Quick Tip: Knowing if an Object’s Attribute is Empty or Nil

I was browsing the ActiveRecord documentation and I came across notation that looks like this: User.name? When I looked more closely, I realized that it replaced all of the places where I had something...

View Article

9 Resources for New Ruby on Rails Developers

If you’re new to Ruby on Rails, you sometimes don’t know where to start with Ruby on Rails. Here are some resources that have helped me become familiar with Ruby and Ruby on Rails. Ruby Guides The...

View Article


Rails Metal Example #4: Redirecting Affiliate Links

A week and a half ago, I posted 9 Ways to Use Rails Metal. The fourth way I listed was “Redirecting Affiliate Links.” The basic idea is that you can set up http://mydomain.com/hosting to go to the link...

View Article


Print Debug Information to Its Own Log

Setting up a Debug Log Have you ever been debugging your Rails application and watching the development log fly by wishing that you could put output just the information you need to its own log?...

View Article

Rails Metal Example #5: Static Content

Serving static pages with Rails Metal is actually very simple. Here are the assumptions we’re making. Each static page’s content is made up of valid HTML. Each static page has a path and content stored...

View Article

RSpec vs Test::Unit

Having used both Test::Unit and RSpec, I have to agree with Jim Weirich: the difference between the two is primarily semantics. It seems to me that functionally, they are both equally capable of...

View Article

Image may be NSFW.
Clik here to view.

Ruby on Rails: Restful Links When You Don’t Know the Class

I had a friend email me a week or so ago about generating a link from your restful routes when you don’t know the class. Here’s a quick thumbnail of the scenario. You have a bunch of restful routes...

View Article


Rails Metal Example #7: Tracking Analytics

Last month, I posted 9 Ways to Use Rails Metal. This is the seventh way to use Rails Metal. A week ago, I posted Ruby on Rails: Polymorphic Associations with Mixin Modules which included an example of...

View Article

Good-bye Rails Envy, Hello Ruby 5!

For those that followed Rails Envy, you’re probably aware that Gregg Pollack and Jason Seifer have discontinued the Rails Envy podcast. The Rails Envy website is still there, for those who are checking...

View Article


Ruby on Rails: Nifty Generators

While looking at articles and resources about authentication in Ruby on Rails I ran across a set of generators written by Ryan Bates of Railscasts. You can find the nifty generators at...

View Article

Screencast: Basic Ruby on Rails Routing

This is my first screencast. I’ve learned a lot about recording screencasts while doing this. The screencast was recorded using a free trial of Camtasia for Mac. The trial is up in 30 days, so I’d...

View Article


Deployment with Capistrano

One problem that seems to face people when they’re attempting to move their applications into production is the best way to manage deployment of their application. This is where tools like capistrano...

View Article

Rails Templates: My Template

I just read the article by Pratik Naik from the Rails Core Team regarding Rails Templates. Have you ever wished you could start out your Rails application with all of your gems installed and all of...

View Article

More ActiveRecord Notes

I started reading ActiveRecord::Base a few days ago and found 8 things that I didn’t know about that it offered. I also only made it about 1/4 of the way through the code. Here are a few new things...

View Article
Browsing all 34 articles
Browse latest View live




Latest Images