<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Rails Development Blog</title>
	<atom:link href="http://www.railsdevtalk.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.railsdevtalk.com</link>
	<description>All About Rails Development</description>
	<pubDate>Wed, 05 May 2010 20:01:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ruby Conditional Assigment Operator  &#124;&#124;=</title>
		<link>http://www.railsdevtalk.com/ruby-conditional-assigment-operator</link>
		<comments>http://www.railsdevtalk.com/ruby-conditional-assigment-operator#comments</comments>
		<pubDate>Wed, 05 May 2010 20:01:37 +0000</pubDate>
		<dc:creator>Abdul Basit Munda</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.railsdevtalk.com/?p=130</guid>
		<description><![CDATA[Conditional Assignment Operator, &#124;&#124;=, allows you to set the value of a variable, if there is no previous value set to it. This is a shorthand for something like this:

def get_instance
  unless @car
    @car = Car.new
  end
end 

This code can be shorthand to :

def get_instance
    @car = [...]]]></description>
			<content:encoded><![CDATA[<p>Conditional Assignment Operator, ||=, allows you to set the value of a variable, if there is no previous value set to it. This is a shorthand for something like this:</p>
<pre>
<code>def get_instance
  unless @car
    @car = Car.new
  end
end </code>
</pre>
<p>This code can be shorthand to :</p>
<pre>
<code>def get_instance
    @car = @car || Car.new
end </code>
</pre>
<p>You can <em> even </em> further shorthand the method to:</p>
<pre>
<code>def get_instance
    @car ||= Car.new
end </code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.railsdevtalk.com/ruby-conditional-assigment-operator/feed</wfw:commentRss>
		</item>
		<item>
		<title>Aliasing a Method</title>
		<link>http://www.railsdevtalk.com/aliasing-a-method</link>
		<comments>http://www.railsdevtalk.com/aliasing-a-method#comments</comments>
		<pubDate>Sat, 01 May 2010 23:06:08 +0000</pubDate>
		<dc:creator>Abdul Basit Munda</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.railsdevtalk.com/?p=114</guid>
		<description><![CDATA[In Ruby, aliasing a method is a very cool way of overriding a method, but still having the ability to call the original, overrided method. For example:
if you have a global filter defined in the ApplicationController called  authenticate :

class ApplicationController &#60; ActionController::Base
  before_filter :authenticate;
  def autenticate
     authenticate_user();
  [...]]]></description>
			<content:encoded><![CDATA[<p>In Ruby, aliasing a method is a very cool way of overriding a method, but still having the ability to call the original, overrided method. For example:</p>
<p>if you have a global filter defined in the ApplicationController called <em> authenticate </em>:</p>
<pre>
<code>class ApplicationController &lt; ActionController::Base
  before_filter :authenticate;
  def autenticate
     authenticate_user();
  end
end</code>
</pre>
<p>and you wanted to make a small change to that <em> authenticate </em> filter for the HelloController, we can use an <em> alias_method(new_name, old_name) </em> to achieve that:</p>
<pre>
<code>class HelloController &lt; ApplicationController
   alias_method orig_authenticate, authenticate
  def authenticate
     do_some_extra_stuff();
     # Call original authenticate method
     orig_authenticate();
  end
end</code>
</pre>
<p>This is very useful in occasions, where you would like to override a method, but still want to access the overridden methods.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsdevtalk.com/aliasing-a-method/feed</wfw:commentRss>
		</item>
		<item>
		<title>Changing the Table Name Convention</title>
		<link>http://www.railsdevtalk.com/changing-the-table-name-convention</link>
		<comments>http://www.railsdevtalk.com/changing-the-table-name-convention#comments</comments>
		<pubDate>Tue, 20 Apr 2010 20:04:08 +0000</pubDate>
		<dc:creator>Abdul Basit Munda</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.railsdevtalk.com/?p=107</guid>
		<description><![CDATA[Rails has a convention of making the table names plural, and a model names singular. For example, if a model name is Order then database table name will be Orders. 
This convention is great most of the time but what about if you have a legacy database table and you wanted to port the application [...]]]></description>
			<content:encoded><![CDATA[<p>Rails has a convention of making the table names plural, and a model names singular. For example, if a model name is Order then database table name will be Orders. </p>
<p>This convention is great most of the time but what about if you have a legacy database table and you wanted to port the application onto Rails. Fortunately, there is a solution. You can easily change this convention, by setting <strong>set_table_name <em>table name </em></strong> in the model.</p>
<p>For Example:<br />
<code>class Order &lt; ActiveRecord::Base<br />
	set_table_name "legacy_order"<br />
end</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsdevtalk.com/changing-the-table-name-convention/feed</wfw:commentRss>
		</item>
		<item>
		<title>Riding Rails</title>
		<link>http://www.railsdevtalk.com/riding-rails</link>
		<comments>http://www.railsdevtalk.com/riding-rails#comments</comments>
		<pubDate>Fri, 29 Jan 2010 16:39:46 +0000</pubDate>
		<dc:creator>Abdul Basit Munda</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.flexdevtalk.com/?p=95</guid>
		<description><![CDATA[I decided to relearn Rails, last time I touched Rails was two years ago for my software engineering course. Since then I always wanted to dig deeper into Rails but time was always against me. 
I will be using this blog to convey my learning, observations and comparisons with Rails and other technologies I have [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to relearn Rails, last time I touched Rails was two years ago for my software engineering course. Since then I always wanted to dig deeper into Rails but time was always against me. </p>
<p>I will be using this blog to convey my learning, observations and comparisons with Rails and other technologies I have learned over the years. So lets start!</p>
<p>puts rails_learning</p>
]]></content:encoded>
			<wfw:commentRss>http://www.railsdevtalk.com/riding-rails/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
