<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="0.92">
<channel>
	<title>rails:freeze:gems &#124; freezzo.com</title>
	<link>http://www.freezzo.com</link>
	<description>A blog about web development, especially ruby on rails.</description>
	<lastBuildDate>Thu, 04 Sep 2008 17:37:52 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Instant Rails Scaling through Asynchronous(Non-blocking) ActiveRecord</title>
		<description>The guys over at NeverBlock have released a database adapter for Rails application that will severely increase the performance of ActiveRecord. Its also really easy to integrate into your application. Heres how:

Add a line to environment.rb for mongrel or thin servers:

require 'never_block/servers/thin' 
 or

require 'never_block/servers/mongrel' 


Change the adapter in database.yml:

adapter: ...</description>
		<link>http://www.freezzo.com/2008/09/04/instant-rails-scaling-through-asynchronousnon-blocking-activerecord/</link>
			</item>
	<item>
		<title>ActiveRecord conditions with association from hash</title>
		<description>I'm sure you all know how to use the :conditions attribute when using ActiveRecord:

User.find(:all, :conditions=>['active = ?', true])

And you may even use associations this way:

User.find(:all, :include=>[:photos], :conditions=>['photos.removed = ? and users.active = ?', false, true])

But did you know that you can do this easier through hashes?

User.find(:all, :conditions=>{:active=>true})
User.find(:all, :include=>[:photos], :conditions=>{'photos.removed'=>false, 'users.active'=>true})

Nothing ...</description>
		<link>http://www.freezzo.com/2008/08/29/activerecord-conditions-with-association-from-hash/</link>
			</item>
	<item>
		<title>Custom Rails Environments</title>
		<description>Sometimes you need to create another environment for your rails application aside from development, test, production. In this example we will create a "stage" environment. Here is how you do it.

First create the entry in your config/database.yml file:

# Stage database configuration
stage:
  adapter: sqlite3
  database: db/stage.sqlite3
  timeout: 5000


Next ...</description>
		<link>http://www.freezzo.com/2008/08/26/custom-rails-environments/</link>
			</item>
	<item>
		<title>session[:current_user] = @user =&gt; BAD!</title>
		<description>I'm sure most of you already would know this, or use restful authentication that handles it for you. However, if you have some custom setup where you are loading a user object, and then storing it in session, slap to you!

Basically what I am talking about is doing this in ...</description>
		<link>http://www.freezzo.com/2008/08/22/session-current-user-object-bad/</link>
			</item>
	<item>
		<title>Rails Security - SQL Injection - Sanitize User Input!</title>
		<description>Even though rails makes every effort to help with security in your apps, you should still be proactive about it. Don't just assume that your data will be safe no matter how you code. Here is a prime example.

You have a login form and you process the request like this:

user ...</description>
		<link>http://www.freezzo.com/2008/08/21/rails-security-sql-injection-sanitize-user-input/</link>
			</item>
	<item>
		<title>Capistrano, CVS, and connection refused issue</title>
		<description>If you ever find yourself using CVS as your repository, and are trying to deploy your projects via capistrano, you may run into a connection refused issue.

The easiest way I found a solution around this was to modify the capistrano file: "/capistrano-2.1.0/lib/capistrano/recipes/deploy/scm/cvs.rb". This of course is in your ruby gems ...</description>
		<link>http://www.freezzo.com/2008/08/19/capistrano-cvs-and-connection-refused-issue/</link>
			</item>
	<item>
		<title>Simple &#038; Clean Rails Date/Time Format</title>
		<description>Here is a quick, clean and easy way to get use from strftime on your date/time fields. Create a file called date_format.rb in the config/initializers directory and add the following code:

ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
   :datetime_military => '%Y-%m-%d %H:%M',
   :datetime          => ...</description>
		<link>http://www.freezzo.com/2008/07/21/simple-clean-rails-datetime-format/</link>
			</item>
	<item>
		<title>Rails TypeError (can&#8217;t dump File)</title>
		<description>For a while, I kept getting exceptions from my app in the form of "TypeError (can't dump File):". I finally found out that this was caused when I was using active_record_store with something like file_column, attachment_fu, or paperclip. Basically whenever you're storing a file in session, that was too large ...</description>
		<link>http://www.freezzo.com/2008/06/18/rails-typeerror-cant-dump-file/</link>
			</item>
	<item>
		<title>How are website with Ruby on Rails built?</title>
		<description>

RobbDogg asked: 

I've gone throu the Sitepoint book "Build Your Own Ruby on Rails Web Applications" by Patrick Lenz, and have a good understanding of how web applications are built, but I don't understand how an entire website is built using RoR. Is every page gernerated by one or more ...</description>
		<link>http://www.freezzo.com/2008/05/31/how-are-website-with-ruby-on-rails-built/</link>
			</item>
	<item>
		<title>Learn Ruby on Rails or Python?</title>
		<description>

someoneoutthereishere asked: 

I have some experience with C, and am looking to learn a language that can do some web based stuff. I've done a bit of Perl, but don't really want to learn it. PHP is there also, but again, seems like it may be a bit outdated(?)I've heard ...</description>
		<link>http://www.freezzo.com/2008/05/29/learn-ruby-on-rails-or-python/</link>
			</item>
</channel>
</rss>
