Archive

It seems that a lot of people are confused about what to do when it comes to requiring authentication for their Ruby on Rails application. Here are a few links that helped me figure things out.

Read More

  • DZone
  • Twitter
  • Slashdot
  • Delicious
  • Digg
  • Technorati Favorites
  • Facebook
  • Reddit
  • StumbleUpon
  • LiveJournal
  • Squidoo
  • Google Bookmarks
  • LinkedIn
  • Share/Bookmark

One of the most powerful aspects of Ruby on Rails are the associations we can create between two classes. It is immensely convenient to be able to call person.posts rather than doing a SQL statement to find all of the posts with a person_id of X.

Sometimes, we have instances where the associations could be with multiple classes. For example, if we have a Page class that can be associated with an HTMLAdvertisement or an ImageAdvertisement. In that case, we really want to be able to call @page.advertisement to get the advertisement. This is where polymorphic associations come in.

Polymorphic associations allow us to associate a single attribute of the class to any number of specified classes. Here are the Page, HtmlAdvertisement, and ImageAdvertisement models:

Read More

  • DZone
  • Twitter
  • Slashdot
  • Delicious
  • Digg
  • Technorati Favorites
  • Facebook
  • Reddit
  • StumbleUpon
  • LiveJournal
  • Squidoo
  • Google Bookmarks
  • LinkedIn
  • Share/Bookmark

RMagick is the Ruby wrapper for ImageMagick—the open source API for image manipulation. RMagick is used for graphing with the Gruff gem and many other things in Ruby and Ruby on Rails.

Installing RMagick on Mac OS X is pretty simple, but not as simple as typing gem install rmagick but pretty close.

Read More

  • DZone
  • Twitter
  • Slashdot
  • Delicious
  • Digg
  • Technorati Favorites
  • Facebook
  • Reddit
  • StumbleUpon
  • LiveJournal
  • Squidoo
  • Google Bookmarks
  • LinkedIn
  • Share/Bookmark

I’ve recently been hearing a lot about Edge Rails—the development version of Ruby on Rails— and decided that I wanted to try out all of the cool stuff that’s soon going to be at our fingertips. So, I checked out the source for Edge Rails and realized that other people probably will want to do the same. So, here’s how you do it.

Read More

  • DZone
  • Twitter
  • Slashdot
  • Delicious
  • Digg
  • Technorati Favorites
  • Facebook
  • Reddit
  • StumbleUpon
  • LiveJournal
  • Squidoo
  • Google Bookmarks
  • LinkedIn
  • Share/Bookmark

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 it out as one of the 9 Resources for New Ruby on Rails Developers.

I was considering starting my own podcast to take its place, but Gregg Pollack informed me that he was planning to start a new podcast. It’s now up at http://ruby5.envylabs.com and available on iTunes.

Read More

  • DZone
  • Twitter
  • Slashdot
  • Delicious
  • Digg
  • Technorati Favorites
  • Facebook
  • Reddit
  • StumbleUpon
  • LiveJournal
  • Squidoo
  • Google Bookmarks
  • LinkedIn
  • Share/Bookmark

Older Posts