<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.6" -->
<rss version="0.92">
<channel>
	<title>RailsRocket - Ruby on Rails Tutorials</title>
	<link>http://www.railsrocket.com/articles</link>
	<description>A Ruby on Rails community website with tutorials</description>
	<lastBuildDate>Tue, 18 Nov 2008 20:14:15 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>The Controversial Eval Function</title>
		<description>Today we're going to discuss one of those highly-controversial hot topics in Ruby (if there can be such a thing as a "hot topic" in programming languages)--the eval function.

What does eval do? Quite simply, you pass in some Ruby code in a string, and it'll evaluate it. Observe:


eval "puts 2+2" ...</description>
		<link>http://www.railsrocket.com/articles/the-controversial-eval-function</link>
			</item>
	<item>
		<title>Block Comments in Ruby</title>
		<description>This is an easy one. How do you comment out a chunk of code? Other programming languages (C++, Java, etc.) have a slash-star style of block comments, like so:


/*
	This is a block comment. You can put whatever you want here.
	Even ASCII art! For REAL!  o[+++]XXXXXXXXXXXX>
*/
	// ...


But what about Ruby?

Ruby ...</description>
		<link>http://www.railsrocket.com/articles/block-comments-in-ruby</link>
			</item>
	<item>
		<title>Regular Expressions in Ruby (and Rails)</title>
		<description>If you're new to Regular Expressions, well, go read regular-expressions.info, then come back.

If you're wondering how Rails (and, consequentially, Ruby) deals with Regular Expressions, you've come to the right place.

Syntax
Regular expressions in Rails are bracketed by forward-slash, so a regular expression looks like this: /[0-9]*/. You can put all your ...</description>
		<link>http://www.railsrocket.com/articles/regular-expressions-in-ruby-and-rails</link>
			</item>
	<item>
		<title>Conditional Code</title>
		<description>You're writing a small web application for a new client. You're wrestling with the credit-card processing module--it doesn't do what you want. puts statements and temporary output litter your code. Three hours and eight coke-cans later, you solve it! Joyous, you wipe out the temporary code, and email it to ...</description>
		<link>http://www.railsrocket.com/articles/conditional-code</link>
			</item>
	<item>
		<title>Bort: Better Skeleton Applications</title>
		<description>We're all familiar with the rails command-line tool. It generates a Rails skeleton application with everything you need to start your Rails application--directories, configuration, even a default index page.

But the more you develop Rails applications, the more you begin to realize that some tools and gems are valuable on every ...</description>
		<link>http://www.railsrocket.com/articles/bort-better-skeleton-applications</link>
			</item>
	<item>
		<title>CSS Progress Bar</title>
		<description>One of the unique features of Launchpad is the article count meter. Since Launchpad is geared towards being a community-driven article website, it has an "article count" goal. The idea is that the target moves; it grows, exponentially--because as your site gets popular, more and more people should contribute.

Having said ...</description>
		<link>http://www.railsrocket.com/articles/css-progress-bar</link>
			</item>
	<item>
		<title>String Replacement in Ruby</title>
		<description>If you're used to other programming languages, you're likely looking for some sort of replace function in your strings to replace bits with other bits. But skimming through the String RDoc, you don't find anything like that, right?

There are a couple of options you have available to you. The first ...</description>
		<link>http://www.railsrocket.com/articles/string-replacement-in-ruby</link>
			</item>
	<item>
		<title>Ruby Command-Line Arguments</title>
		<description>If you're writing a serious Ruby application (not a Rails application necessarily), this question may apply to you: how do you access command-line arguments in Ruby?

Ruby provides an array called ARGV (all upper-case). This array contains all the command-line arguments; so if you run this:

ruby script.rb first second third

... then ...</description>
		<link>http://www.railsrocket.com/articles/ruby-command-line-arguments</link>
			</item>
	<item>
		<title>Launchpad</title>
		<description>The Summary
Launchpad is an open-source article-based CMS and blogging platform for Rails.  It has all the features you come to expect from a CMS, like admin-only edit links, commenting, voting, RSS feeds, future-publishing posts, and user registration.  Best of all, it's written 100% in Rails!

The Problem
You want to ...</description>
		<link>http://www.railsrocket.com/articles/launchpad</link>
			</item>
	<item>
		<title>Rails 2.1: Increment and Decrement Value</title>
		<description>Rails allows you to easily increment and decrement fields on your ActiveRecord objects, like so:


page.increment!(:num_views)
ad.decrement!(:views_left)


But what if you want to increment or decrement by more than one? Prior to Rails 2.1, you needed to do this manually:


comment.increment!(:spam_score)
comment.increment!(:spam_score)
comment.increment!(:spam_score)


... would increment by three. In Rails 2.1, increment and decrement both take a ...</description>
		<link>http://www.railsrocket.com/articles/rails-21-increment-and-decrement-value</link>
			</item>
</channel>
</rss>
