<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-360436152455172110</id><updated>2011-11-27T15:24:41.698-08:00</updated><title type='text'>Reddy On Rails more than Ruby</title><subtitle type='html'>You want Ruby? We can do it! Hire us for Ruby, dojo,Extjs,jQuery,Node.js,LAMP, AJAX 

info {at} rubyassist {dot} com</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>64</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-1790723384702168604</id><published>2011-05-25T10:16:00.000-07:00</published><updated>2011-05-25T10:16:05.577-07:00</updated><title type='text'>Kaminari plugin with column_sorting and jquery_ajax</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;pre&gt;&lt;a href="https://github.com/reddyonrails/Kaminari_column_sorting_jquery_ajax"&gt;https://github.com/reddyonrails/Kaminari_column_sorting_jquery_ajax&lt;/a&gt;&lt;/pre&gt;&lt;pre&gt;The above example code for column sorting through ajax calls when doing pagination.&lt;br /&gt;&lt;br /&gt;Better to use sorting image arrows for column heading for visual appealing&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Please visit for original kaminari pagination plugin here.&lt;br /&gt;&lt;a href="https://github.com/amatsuda/kaminari"&gt;https://github.com/amatsuda/kaminari&lt;/a&gt;&lt;br /&gt; &lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-1790723384702168604?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1790723384702168604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1790723384702168604'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2011/05/kaminari-plugin-with-columnsorting-and.html' title='Kaminari plugin with column_sorting and jquery_ajax'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-4495838138184705103</id><published>2011-04-28T13:56:00.000-07:00</published><updated>2011-04-28T13:56:09.291-07:00</updated><title type='text'>For those using MacPorts, ImageMagick 6.6.5 and Ruby 1.9.2.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If anybody get this error :&lt;br /&gt;/gems/carrierwave-0.5.3/lib/carrierwave/processing/rmagick.rb:248: [BUG] Segmentation fault&lt;br /&gt;ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.7.0]&lt;br /&gt;&lt;br /&gt;Theses are the steps to avoid it (Port).&lt;br /&gt;&lt;code&gt;port uninstall ImageMagick&lt;/code&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;port edit ImageMagick&lt;/code&gt;&lt;br /&gt;Add &lt;code&gt;--disable-openmp&lt;/code&gt; to &lt;code&gt;configure.args&lt;/code&gt; (near line 100)&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;port install ImageMagick&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Uninstall imagemagick:&lt;br /&gt;&lt;pre class="lang-rb prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;brew remove imagemagick&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;Delete the cache:&lt;br /&gt;&lt;pre class="lang-rb prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;rm &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;rf &lt;/span&gt;&lt;span class="str"&gt;'brew --cache imagemagick'&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;Then re-install the package with this flag:&lt;br /&gt;&lt;pre class="lang-rb prettyprint"&gt;&lt;code&gt;&lt;span class="pln"&gt;brew install &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;f imagemagick &lt;/span&gt;&lt;span class="pun"&gt;--&lt;/span&gt;&lt;span class="pln"&gt;disable&lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;openmp&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-4495838138184705103?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4495838138184705103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4495838138184705103'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2011/04/for-those-using-macports-imagemagick.html' title='For those using MacPorts, ImageMagick 6.6.5 and Ruby 1.9.2.'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-6518496843514831781</id><published>2011-02-14T15:27:00.000-08:00</published><updated>2011-02-14T15:27:51.863-08:00</updated><title type='text'>how to stop Rspec run on first failure :rspec tip</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="steps"&gt; &lt;ul&gt;&lt;li&gt;&lt;span class="keyword"&gt;Edit&amp;nbsp;&lt;/span&gt; "spec/spec_helper.rb" with: &lt;div class="pre"&gt;&lt;pre&gt;RSpec.configure {|config| config.fail_fast = true}&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;Set&amp;nbsp; the fail_fast option to tell RSpec to stop the run on first failure.&lt;br /&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-6518496843514831781?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6518496843514831781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6518496843514831781'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2011/02/how-to-stop-rspec-run-on-first-failure.html' title='how to stop Rspec run on first failure :rspec tip'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-310895298846354895</id><published>2011-01-31T14:40:00.000-08:00</published><updated>2011-01-31T14:46:49.961-08:00</updated><title type='text'>Restful routes for non ID( primary key ) rails 3</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Lets suppose that you have a Profile model, and&amp;nbsp; you have a &lt;tt&gt;resources :profiles&lt;/tt&gt; route.&lt;br /&gt;&lt;br /&gt;Generally, &lt;tt&gt;profile_path&lt;/tt&gt; will build a path with the profile object’s ‘id’ in it: &lt;br /&gt;&lt;pre&gt;profile &lt;span class="punct"&gt;=&lt;/span&gt; profile&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_name&lt;/span&gt;&lt;span class="punct"&gt;('jaganreddy&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;&lt;br /&gt;  profile&lt;span class="ident"&gt;_path&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;profile&lt;span class="punct"&gt;)&lt;/span&gt;  &lt;span class="comment"&gt;# =&amp;gt; "/&lt;/span&gt;profile&lt;span class="comment"&gt;s/1"&lt;/span&gt;&lt;/pre&gt;You can override &lt;tt&gt;to_param&lt;/tt&gt; in your model to make &lt;tt&gt;profile_path&lt;/tt&gt; build a path using the profile’s name instead of the profile’s id: &lt;br /&gt;&lt;pre&gt;&lt;b&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Profile&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; ActiveRecord::Base&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;    &lt;span class="keyword"&gt;def to_param&lt;/span&gt; &lt;span class="comment"&gt;# overridding default behaviour&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;span class="comment"&gt;&amp;nbsp;&lt;/span&gt;      &lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="keyword"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;span class="keyword"&gt;    end&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;span class="keyword"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;    &lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;  profile &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Profile&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_name&lt;/span&gt;&lt;span class="punct"&gt;('jaganreddy&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;&lt;br /&gt;  &lt;span class="ident"&gt;profile_path&lt;/span&gt;&lt;span class="punct"&gt;(profile&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;  &lt;span class="comment"&gt;# =&amp;gt; "/profiles/jaganreddy"&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Also take care for nested resources too&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;In your controller always looks for  &lt;br /&gt;&lt;span class="constant" style="color: blue;"&gt;Profile&lt;/span&gt;&lt;span class="punct" style="color: blue;"&gt;.&lt;/span&gt;&lt;span class="ident" style="color: blue;"&gt;find_by_name&lt;/span&gt;&lt;span class="punct" style="color: blue;"&gt;(params[:id]&lt;/span&gt;&lt;span class="punct" style="color: blue;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-310895298846354895?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/310895298846354895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/310895298846354895'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2011/01/restful-routes-for-non-id-primary-key.html' title='Restful routes for non ID( primary key ) rails 3'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-7482643956694324193</id><published>2011-01-26T13:53:00.000-08:00</published><updated>2011-01-26T13:58:19.323-08:00</updated><title type='text'>how to set primary key and autoincrement on non id column using  rails 3 -- sqlite</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;sqlite_adopter uses&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def default_primary_key_type&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if supports_autoincrement?&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'INTEGER PRIMARY KEY NOT NULL'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;and under the create table definition the line says: &lt;br /&gt;table_definition.primary_key(options[:primary_key] || Base.get_primary_key(table_name.to_s.singularize)) unless options[:id] == false &lt;br /&gt;&lt;br /&gt;that means we should not set :id =&amp;gt; false ... many people will do to avoid id column..&amp;nbsp; this is fine&lt;br /&gt;but if you want&amp;nbsp; other column as primary key add at table definition not at column definition.(dont add :id =&amp;gt; false)..&lt;br /&gt;&lt;br /&gt;adding primary_key at table definition will take care of removing id column.&amp;nbsp; the following line will also add t ocolumn definition&lt;br /&gt;&amp;nbsp; 'INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL'&lt;br /&gt;&amp;nbsp;ofcourse based on sqlite3 version...&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def supports_autoincrement? #:nodoc:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sqlite_version &amp;gt;= '3.1.0'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp;Note: so autoincrement for :primary_key is hard coded&lt;br /&gt;sample:&lt;br /&gt;create_table :students, :primary_key =&amp;gt; student_id do |t|&lt;br /&gt;&amp;nbsp;&amp;nbsp; t.string :name&lt;br /&gt;end&lt;br /&gt;it generates students table as follows;&lt;br /&gt;&amp;nbsp;&lt;span style="color: blue;"&gt; students;&lt;/span&gt;&lt;br /&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; student_id : primary key autoincrement&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name :&amp;nbsp;&amp;nbsp; varchar&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This is for what i am using version of rails : 3.0.3&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-7482643956694324193?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7482643956694324193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7482643956694324193'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2011/01/how-to-set-primary-key-and.html' title='how to set primary key and autoincrement on non id column using  rails 3 -- sqlite'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-4939096613122196449</id><published>2011-01-10T12:04:00.000-08:00</published><updated>2011-01-10T12:04:46.822-08:00</updated><title type='text'>undefined method `user_signed_in? with Rails 3.0.3 - Devise</title><content type='html'>I just started a new rails 3.0.3 application after doing a gem update &lt;br /&gt;(loaded rails 3.0.3 and devise 1.1.5) and I got the same error. This &lt;br /&gt;was following the default devise install instructions.&lt;br /&gt;&lt;br /&gt;answer:&lt;br /&gt;for got to add&lt;br /&gt;devise_for :users in routes.rb&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-4939096613122196449?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4939096613122196449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4939096613122196449'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2011/01/undefined-method-usersignedin-with.html' title='undefined method `user_signed_in? with Rails 3.0.3 - Devise'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-1294895768605190082</id><published>2010-11-05T14:09:00.000-07:00</published><updated>2010-11-05T14:09:58.472-07:00</updated><title type='text'>Date sort in ruby from array can have date formats ,non date formats</title><content type='html'>Date sorting(ruby) from array is easy if array contain strings with proper date formats. Sometime invalid date formats raise argument error.&lt;br /&gt;&lt;br /&gt;Sample i have used&amp;nbsp; for date column attribute as follows.&lt;br /&gt;def sort_on_mature_date(listings)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; listings.sort do |x,y|&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x_matures_on = x.when_does_it_mature? #date type&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y_matures_on = y.when_does_it_mature? #date type&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; begin&amp;nbsp; Date.parse(x_matures_on)&amp;nbsp;&amp;nbsp; rescue&amp;nbsp; x_matures_on="1900-1-1" end&amp;nbsp;&amp;nbsp;&amp;nbsp; #string could be not a date like "now"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; begin Date.parse(y_matures_on) rescue y_matures_on="1900-1-1" end&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date.parse(x_matures_on)&amp;lt;=&amp;gt;Date.parse(y_matures_on)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp; end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-1294895768605190082?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1294895768605190082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1294895768605190082'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2010/11/date-sort-in-ruby-from-array-can-have.html' title='Date sort in ruby from array can have date formats ,non date formats'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-8776924529429490717</id><published>2010-10-22T11:18:00.000-07:00</published><updated>2010-10-22T11:33:39.203-07:00</updated><title type='text'>Rails rounded corner box helper</title><content type='html'>Here is the helper include in your rails app. You need to take care of images .&lt;br /&gt;#usage:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;lt;%top = {"background-image"=&amp;gt;"url('/images/accept_box_top.png')",:height=&amp;gt;"6px",:width=&amp;gt;"328px"}%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp; &amp;lt;%mid = {"background-image"=&amp;gt;"url('/images/accept_box_mid.png')",:height=&amp;gt;"405px",:width=&amp;gt;"auto"}%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp; &amp;lt;%bottom = {"background-image"=&amp;gt;"url('/images/accept_box_bottom.png')",:height=&amp;gt;"9px",:width=&amp;gt;"auto"}%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp; &amp;lt;%content = {"padding"=&amp;gt;"15px 28px 22px 26px"}%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp; &amp;lt;%=round_box(top,mid,bottom,content){|f|&amp;nbsp; "nice box"} %&amp;gt;&lt;/span&gt; &lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Make sure that you pass right height and width. It automatically renders the box and content inside.&lt;br /&gt;If you want you also add extra css attributes too!&lt;br /&gt;&lt;br /&gt;&lt;div style="color: orange;"&gt;#round_box_helper.rb&lt;br /&gt;&lt;br /&gt;module RoundBoxHelper&lt;br /&gt;&lt;br /&gt;&amp;nbsp; def round_box(top, mid,bottom,content,&amp;amp;b)&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; css_elements( top,mid,bottom,content)+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;div class = 'accept_gift_box'&amp;gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class='accept_gift_box_top'&amp;gt;&amp;lt;/div&amp;gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class='accept_gift_box_mid'&amp;gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div&lt;br/&gt; class='accept_gift_box_content'&amp;gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt; "+b.call+"&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class='accept_gift_box_bottom'&amp;gt; &amp;lt;/div&amp;gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/div&amp;gt;"&lt;br/&gt;&lt;br /&gt;&amp;nbsp; end&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; def css_elements top,mid,bottom,content&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;style type='text/css'&amp;gt; " +&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ".accept_gift_box_top{"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parse_styles( top )+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "}"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ".accept_gift_box_mid{"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parse_styles( mid )+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "}"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ".accept_gift_box_bottom{"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parse_styles( bottom )+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "}"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ".accept_gift_box_content{"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parse_styles( content )+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "}"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ".accept_gift_box{"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "float:left;"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "}"+&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;/style&amp;gt;"&lt;br/&gt;&lt;br /&gt;&amp;nbsp; end&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; def parse_styles el&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; str=""&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.each_pair do |attr,value|&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; str = str+attr.to_s+":"+value.to_s+";"&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; str&lt;br/&gt;&lt;br /&gt;&amp;nbsp; end&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;end&lt;/div&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-8776924529429490717?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8776924529429490717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8776924529429490717'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2010/10/rails-rounded-corner-box-helper.html' title='Rails rounded corner box helper'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2878352585338186417</id><published>2010-09-28T09:45:00.000-07:00</published><updated>2010-09-28T09:47:47.773-07:00</updated><title type='text'>width and top of invisible element in IE may  give 0 zero using jQuery</title><content type='html'>jQuery element width for invisible element in IE will not give exact result.&lt;br /&gt;But&amp;nbsp; in Firefox it works perfectly.&lt;br /&gt;&lt;br /&gt;$(e).width() //using jQuery to get the width.&lt;br /&gt;&lt;br /&gt;i have used a way to solve this one by showing, calculate width and hiding the element.&lt;br /&gt;&lt;br /&gt;$(e).&lt;br /&gt;show(). // to get the width of visible element ==&amp;gt; IE issue&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; css({zoom: 1,left:$(e).position().left-parseInt($(e).width()),top:$(e).position().top}).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hide().&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2878352585338186417?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2878352585338186417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2878352585338186417'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2010/09/width-and-top-of-invisible-element-in.html' title='width and top of invisible element in IE may  give 0 zero using jQuery'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2750581848262581229</id><published>2010-09-28T09:34:00.000-07:00</published><updated>2010-09-28T09:37:34.766-07:00</updated><title type='text'>jQuery animation effect slide bug in IE 7</title><content type='html'>The best example is for this ind of bug is presented by ryan as follows&lt;br /&gt;&lt;br /&gt;http://www.ryancramer.com/misc/jquery_slide/#&lt;br /&gt;&lt;br /&gt; the slide effects of jquery may not work 100% correctly in IE  6 &amp;amp; IE 7 .  Effects are misbehave like effects complete till 50% or so...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So i have used show call back function to rescue the bug.. Though it is 100% not correct but once the effects renders second time it works perfectly.&lt;br /&gt;&lt;br /&gt;So make it show and show it again..with less duration.. to avoid flickering effect.&lt;br /&gt;&lt;br /&gt;$("my_element").show(1,function(){$(this).show("slide",{direction:"right"})})&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2750581848262581229?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2750581848262581229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2750581848262581229'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2010/09/jquery-animation-effect-slide-bug-in-ie.html' title='jQuery animation effect slide bug in IE 7'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-3830413968621971378</id><published>2009-07-08T09:24:00.000-07:00</published><updated>2009-07-08T09:36:18.060-07:00</updated><title type='text'>authenticity_token not available in Rails 2.X  version   for non forms</title><content type='html'>This problem occur&amp;nbsp; if view is not having any form ...&lt;br /&gt;When a form is being generated rails automatically adds something like&lt;br /&gt;this: &lt;br /&gt;&lt;pre&gt;&amp;lt; input name="authenticity_token" type="hidden" value="11ff3908e6cd4be7b4041a93b783829ce6b12349" &amp;gt;  &lt;br /&gt;If view does not contain form (&lt;b&gt;&lt;b&gt;"authenticity_token&lt;/b&gt;&lt;/b&gt;")  InvalidAuthenticityToken is being raised.&lt;br /&gt; &lt;/pre&gt;&lt;pre&gt;So You can do something like this in your view to make your authenticity &lt;br /&gt;token available to your javascript in your views.&lt;br /&gt;&lt;br /&gt;&amp;lt;%= javascript_tag "window._token = '#{form_authenticity_token}'" %&amp;gt;&lt;br /&gt;&lt;br /&gt;That will make your authenticity token available to your custom &lt;br /&gt;javascript Ajax requests.  If you're using &lt;b&gt;prototype.js&lt;/b&gt; and you want to &lt;br /&gt;do a custom PUT, you do something like this.&lt;br /&gt;&lt;br /&gt;  new Ajax.Request ('/products/1', {&lt;br /&gt;    method: 'put',&lt;br /&gt;    parameters: 'product[name]=chair&amp;amp;authenticity_token=' + &lt;br /&gt;window._token});&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;If you use &lt;b&gt;Jquery &lt;/b&gt;:=&lt;/pre&gt;&lt;pre&gt;$.ajax({&lt;br /&gt;              url: "people/1,&lt;br /&gt;              global: false,&lt;br /&gt;              type: "PUT",&lt;br /&gt;              data: ({'person[name]' : 'hey',authenticity_token : window._token}),&lt;br /&gt;              dataType: "html",&lt;br /&gt;              success: function(msg){&lt;br /&gt;                 //ur msg;&lt;br /&gt;              }});&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-3830413968621971378?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3830413968621971378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3830413968621971378'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2009/07/authenticitytoken-not-available-in.html' title='authenticity_token not available in Rails 2.X  version   for non forms'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-4430550717999991329</id><published>2009-06-11T14:53:00.000-07:00</published><updated>2009-06-11T14:53:09.823-07:00</updated><title type='text'>MS Word processing  or parsing using ruby and Apache POI</title><content type='html'>I am looking for MS word document processing to get text information using ruby. But could not find right gems in ruby. Some win32 ole libraries are there but will not work in linux. So thought about using Poi java api to process word document.&lt;br /&gt;&lt;br /&gt;I hv downloded poi jar files from here.&lt;br /&gt;&lt;a href="http://www.apache.org/dyn/closer.cgi/poi/release/"&gt;http://www.apache.org/dyn/closer.cgi/poi/release/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;changed the name of the directory to &lt;b&gt;poi &lt;/b&gt;folder .&lt;br /&gt;&lt;br /&gt;Check the following ruby script to get the parsed text .. it uses java interface code in &lt;u&gt;WordSampleReader.java&lt;/u&gt;&amp;nbsp;&amp;nbsp; this file should be compiled and should be available under poi folder where all jar files are there.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #674ea7;"&gt;CONFIG = {}&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;class WordReader&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp; #include Config&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp; CONFIG['host'] = 'mswin32'&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp; def self.generate_text(filename)&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; interface_classpath=Dir.getwd+"/poi" &lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case CONFIG['host']&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when /mswin32/&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dir.foreach("poi") do |file|&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; interface_classpath &amp;lt;&amp;lt; ";#{Dir.getwd}/poi/"+file if (file != '.' and file != '..' and file.match(/.jar/))&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = "java -cp \"#{interface_classpath}\" WordSampleReader "+filename&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dir.foreach(Dir.getwd+"/poi/") do |file|&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; interface_classpath &amp;lt;&amp;lt; ":#{Dir.getwd}/poi/"+file if (file != '.' and file != '..' and file.match(/.jar/))&amp;nbsp; &lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = "java -cp \"#{interface_classpath}\" WordSampleReader "+filename&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = ""&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IO.popen(path, "w+b" ) { |x| result= x.read }&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;&amp;nbsp; end&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;end&lt;/span&gt;&lt;br style="color: #674ea7;" /&gt;&lt;br style="color: #674ea7;" /&gt;&lt;span style="color: #674ea7;"&gt;puts reader = WordReader.generate_text('poi/test.doc')&lt;/span&gt;&lt;br style="color: #8e7cc3;" /&gt;&lt;br /&gt;&lt;br /&gt;Though i dont know java used sample code found in google..&amp;nbsp; The file called &lt;b&gt;WordSampleReader.java&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;The source code file is ...&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #351c75;"&gt;//package com.informit.poi;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;// Import POI classes&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;import org.apache.poi.poifs.filesystem.*;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;import org.apache.poi.hwpf.*;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;import org.apache.poi.hwpf.extractor.*;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;// Import Java classes&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;import java.io.*;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;import java.util.*;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;public class WordSampleReader&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;{&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp; public static void main( String[] args )&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp; {&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; if( args.length == 0 )&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println( "Usage: WordSampleReader &lt;filename&gt;" );&lt;/filename&gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.exit( 0 );&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; String filename = args[ 0 ];&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; try&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create a POI File System object; this is the main class for the POIFS file system&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // and it manages the entire lifecycle of the file system&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; POIFSFileSystem fs = new POIFSFileSystem( new FileInputStream( filename ) );&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create a document for this file&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HWPFDocument doc = new HWPFDocument( fs );&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create a WordExtractor to read the text of the word document&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WordExtractor we = new WordExtractor( doc );&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Extract all paragraphs in the document as strings&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String[] paragraphs = we.getParagraphText();&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Output the document&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //System.out.println( "Word Document has " + paragraphs.length + " paragraphs" );&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // for( int i=0; i&lt;paragraphs.length; )="" i++=""&gt;&lt;/paragraphs.length;&gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //{&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //System.out.println( paragraphs[ i ] );&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //}&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; output text&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println( we.getText() );&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; catch( Exception e )&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;&amp;nbsp; }&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-4430550717999991329?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4430550717999991329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4430550717999991329'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2009/06/ms-word-processing-or-parsing-using.html' title='MS Word processing  or parsing using ruby and Apache POI'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-5874056401849746832</id><published>2009-05-11T11:37:00.000-07:00</published><updated>2009-05-11T11:37:12.160-07:00</updated><title type='text'>QuickBase autheticate ruby method bug in quickbase client library</title><content type='html'>For subsequent calls with the help of ruby quickbase api , it should consider the old token number.&lt;br /&gt;&lt;br /&gt;Existing method :&lt;br /&gt;&lt;div style="color: red;"&gt;def authenticate( username, password, hours = nil )&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @username, @password, @hours = username, password, hours&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if username and password&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ticket = nil&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlRequestData = toXML( :hours, @hours ) if @hours&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sendRequest( :authenticate )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @userid = getResponseValue( :userid )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self if @chainAPIcalls&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return @ticket, @userid&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elsif username or password&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise "authenticate: missing username or password"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elsif @ticket&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise "authenticate: #{username} is already authenticated"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp;&amp;nbsp; end&lt;/div&gt;&lt;br /&gt;The above one missing token variable and which is very important for next or immediate calls.&lt;br /&gt;so add this line in the above method.&lt;br /&gt;&lt;i style="color: blue;"&gt;&lt;b&gt;@ticket = getResponseValue( :ticket )&lt;/b&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-5874056401849746832?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5874056401849746832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5874056401849746832'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2009/05/quickbase-autheticate-ruby-method-bug.html' title='QuickBase autheticate ruby method bug in quickbase client library'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2137723679059626633</id><published>2009-04-11T22:49:00.000-07:00</published><updated>2009-04-11T22:49:38.789-07:00</updated><title type='text'>Import Gmail Contacts - Ruby on Rails</title><content type='html'>Tried with my own ruby script to get contact information from google but requires some more extra work to make request in secure way.&lt;br /&gt;&lt;br /&gt;First, you need to register your domain with Google. This can be as easy as uploading a temporary file to your domain’s root directory to verify control of the domain. The steps for doing this are clearly outlined at &lt;a href="http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html"&gt;Registration for Web-Based Applications&lt;/a&gt;. &amp;nbsp; &lt;br /&gt;&lt;br /&gt;I find good&amp;nbsp; article to import google contact information. Use the same code but check the code for error free.. you should have same patience to make it work :-)&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;a href="http://blog.guitarati.com/2008/08/google-accounts-authentication-using.html"&gt;&lt;span style="font-size: small;"&gt;http://blog.guitarati.com/2008/08/google-accounts-authentication-using.html&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;&lt;h1&gt;&lt;br /&gt;&lt;/h1&gt;&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2137723679059626633?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2137723679059626633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2137723679059626633'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2009/04/import-gmail-contacts-ruby-on-rails.html' title='Import Gmail Contacts - Ruby on Rails'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-217919689071601298</id><published>2008-12-17T10:52:00.000-08:00</published><updated>2008-12-17T11:00:11.090-08:00</updated><title type='text'>nil? problem on object methods in ruby use Object#try</title><content type='html'>Object#try is a solution that I like. However, it uses Object#respond_to?&lt;br /&gt;Ruby Community uses this solution recently in github.&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;class Object&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    ##&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    #   @person ? @person.name : nil&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;   # vs&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;   #   @person.try(:name)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;  def try(method)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;      send method if respond_to? method&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;  end&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But it does not solve the problem of args and blocks.&lt;br /&gt;The right solution for generic try method is :&lt;br /&gt;#By &lt;a href="http://rubyassist.com/"&gt;Jagan Reddy&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;class Object&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;   def try(method, *args, &amp;amp;block)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;       send(method, *args, &amp;amp;block) if respond_to?(method, true)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;   end &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;end&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-217919689071601298?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/217919689071601298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/217919689071601298'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/12/nil-problem-on-object-methods-in-ruby.html' title='nil? problem on object methods in ruby use Object#try'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-5637077532381223151</id><published>2008-12-17T10:46:00.000-08:00</published><updated>2008-12-17T10:52:15.831-08:00</updated><title type='text'>difference between lambda and Proc.new  (Closures)</title><content type='html'>The&lt;span style="font-style: italic;"&gt; &lt;span style="font-weight: bold;"&gt;#lambda&lt;/span&gt;&lt;/span&gt; is not the same as&lt;span style="font-style: italic; font-weight: bold;"&gt; Proc#new&lt;/span&gt;. It’s  ok to say the same, but not exactly.&lt;br /&gt;&lt;b&gt;1: First Difference&lt;/b&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;$ irb&lt;/span&gt; &lt;span style="color:blue;"&gt;irb(main):001:0&amp;gt;&lt;br /&gt;Proc.new{|x,y| }.call 1,2,3&lt;/span&gt; &lt;span style="color:blue;"&gt;=&amp;gt;&lt;br /&gt;nil&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;irb(main):002:0&amp;gt;&lt;br /&gt;lambda {|x,y| }.call 1,2,3&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;ArgumentError: wrong number of arguments (3 for 2)&lt;/span&gt; &lt;span style="color:blue;"&gt;from (irb):2&lt;/span&gt; &lt;span style="color:blue;"&gt;from (irb):2:in `call'&lt;/span&gt; &lt;span style="color:blue;"&gt;from (irb):2&lt;/span&gt; &lt;span style="color:blue;"&gt;from :0&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;irb(main):003:0&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2: Second Difference&lt;/b&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;def test_ret_procnew&lt;br /&gt;  ret = Proc.new { return 'Returned' }&lt;br /&gt;  ret.call “This is not reached”&lt;br /&gt;end&lt;br /&gt;# prints 'Returned'&lt;br /&gt;puts test_ret_procnew&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;While return from lambda acts more conventionally, returning to its caller:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;def test_ret_lambda&lt;/span&gt;&lt;br /&gt; &lt;span style="color:blue;"&gt;ret = lambda { return “Returned” }&lt;/span&gt; &lt;span style="color:blue;"&gt;&lt;br /&gt; ret.call&lt;/span&gt; &lt;span style="color:blue;"&gt;“This is printed”&lt;br /&gt;&lt;/span&gt; &lt;span style="color:blue;"&gt;end&lt;/span&gt;  &lt;span style="color:blue;"&gt;&lt;br /&gt;# prints “This is printed”&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;puts test_ret_lambda&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-5637077532381223151?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5637077532381223151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5637077532381223151'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/12/difference-between-lambda-and-procnew.html' title='difference between lambda and Proc.new  (Closures)'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-683493073092360622</id><published>2008-12-12T09:52:00.000-08:00</published><updated>2008-12-12T09:54:39.582-08:00</updated><title type='text'>Sass &amp; Haml  AutoCompile option</title><content type='html'>If you are using &lt;a href="http://haml.hamptoncatlin.com/"&gt;Sass &amp;amp; Haml,&lt;/a&gt; then you may wanted to compile files for each request =&amp;gt;&lt;br /&gt;&lt;br /&gt;Just add the following small chunk of&amp;nbsp; code to your &lt;code&gt;development.rb&lt;/code&gt; file. &lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;Sass::Plugin.options[:always_update] = true&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="color: red;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="color: red;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-683493073092360622?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/683493073092360622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/683493073092360622'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/12/sass-haml-autocompile-option.html' title='Sass &amp; Haml  AutoCompile option'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-7061941737602804509</id><published>2008-12-10T15:04:00.000-08:00</published><updated>2008-12-10T15:09:36.853-08:00</updated><title type='text'>Ruby language features</title><content type='html'>When started learning ruby in 2004, api helped me to understand the features.&lt;br /&gt;Though I used most of rugular expressions and classes, rails gave me enough experience to make use of &lt;br /&gt;many ruby unique features like jayson expalined in the following article.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.rubytips.org/2008/04/07/10-unique-ruby-language-features/"&gt;http://www.rubytips.org/2008/04/07/10-unique-ruby-language-features/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also look athe Features of Ruby by Michael Neumann&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ntecs.de/old-hp/s-direktnet/ruby_en.html"&gt;http://www.ntecs.de/old-hp/s-direktnet/ruby_en.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-7061941737602804509?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7061941737602804509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7061941737602804509'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/12/ruby-language-features.html' title='Ruby language features'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-1176161659642058141</id><published>2008-12-05T07:56:00.000-08:00</published><updated>2008-12-05T08:01:01.210-08:00</updated><title type='text'>Ruby on Rails Rake Tutorial</title><content type='html'>In Rails developement, we will be using  running &lt;strong&gt;"rake"&lt;/strong&gt; to run your tests or maybe you've used &lt;strong&gt;"rake db:migrate"&lt;/strong&gt; to run your migrations. Many of us know about Make scripts. What if you want to run ruby scrupts inside make then we need rake for that. Did you realize that you can write your own tasks or create your own library of useful Rake files?&lt;br /&gt;&lt;br /&gt;Greg of rails envy gave nice article on Rails Rake ..:-)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.railsenvy.com/2007/6/11/ruby-on-rails-rake-tutorial"&gt;http://www.railsenvy.com/2007/6/11/ruby-on-rails-rake-tutorial&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-1176161659642058141?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1176161659642058141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1176161659642058141'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/12/ruby-on-rails-rake-tutorial.html' title='Ruby on Rails Rake Tutorial'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-5928263970418395816</id><published>2008-11-07T11:00:00.000-08:00</published><updated>2008-11-07T11:02:23.631-08:00</updated><title type='text'>APTANA ,RDT and RadRails Keyboard Shortcuts</title><content type='html'>&lt;a href="http://rubyeclipse.sourceforge.net/"&gt;RDT&lt;/a&gt; together with &lt;a href="http://www.radrails.org/"&gt;RadRails&lt;/a&gt; on &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; is a pretty convenient development environment when doing things in &lt;a href="http://www.rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt;. The keyboard shortcuts. &lt;br /&gt;&lt;h4&gt;Ctrl-Alt-T&lt;/h4&gt;Jump to the test case of a model or controller and vice versa.&lt;br /&gt;&lt;h4&gt;Ctrl-Shift-V&lt;/h4&gt;Jump to the view of a controller method and vice versa.&lt;br /&gt;&lt;h4&gt;Ctrl-Alt-X&lt;/h4&gt;Factor out a partial from a view. Simply select the code block you want to factor out into a separate partial an press the key combination. A window opens an you can enter the name for the new partial (dont't forget the _ and the .rhtml).&lt;br /&gt;&lt;h4&gt;Ctrl-Shift-F&lt;/h4&gt;Auto-format the selected code (Ruby only). Not that mature, yet, and seems to have problems with regular expression - currently not recommended to use.&lt;br /&gt;&lt;h4&gt;Ctrl-Shift-C&lt;/h4&gt;Toggle comment (Ruby only), i.e. the selected code block will be commented out if it wasn't (# are inserted in the first column of each row), and vice versa.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,geneva;"&gt;You can also keep up with general Aptana updates as well as &lt;a href="http://www.aptana.com/blog/?cat=5"&gt;RDT and RadRails specific news&lt;/a&gt; on the &lt;a href="http://www.aptana.com/blog/"&gt;Aptana blog&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-5928263970418395816?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5928263970418395816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5928263970418395816'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/11/aptana-rdt-and-radrails-keyboard.html' title='APTANA ,RDT and RadRails Keyboard Shortcuts'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-6565529924383631976</id><published>2008-11-07T10:54:00.000-08:00</published><updated>2008-11-07T10:55:53.146-08:00</updated><title type='text'>Aptana RadRails Debugger Problem</title><content type='html'>&lt;span class="postbody"&gt;I've found the debugger equally slow when launching it via the "servers" tab. &lt;br /&gt;&lt;br /&gt;There is a new "remote debug" capability in the trunk version of RadRails. Instead of launching a server from within RadRails, you can start your server externally (on the same or a different computer) under the control of debug-ide and then attach to it from a debug session in RadRails. &lt;br /&gt;&lt;br /&gt;I've been using this capability, and found that it also solves the "slow debugger startup" problem. &lt;br /&gt;&lt;br /&gt;Not sure why, and I wouldn't have expected it, but it's what I've observed.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-6565529924383631976?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6565529924383631976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6565529924383631976'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/11/aptana-radrails-debugger-problem.html' title='Aptana RadRails Debugger Problem'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-1705744926624906573</id><published>2008-10-10T13:48:00.000-07:00</published><updated>2008-10-10T13:51:19.806-07:00</updated><title type='text'>Ruby on Rails applications with Mongrel cluster and Apache url rewriting on Windows</title><content type='html'>For windows, we need install mongrel_service gem to run mongrel clusters...&lt;br /&gt;&lt;br /&gt;What you will need to do is to manually create n mongrel services for the n clusters you will need.&lt;br /&gt;&lt;br /&gt;Visit this link . you will find windows mongrel configuration as well as ubuntu tooo &lt;br /&gt;&lt;br /&gt;Nice article and simple tooo&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.paolocorti.net/2007/11/15/ruby-on-rails-applications-with-mongrel-cluster-and-apache-url-rewriting-on-windows/"&gt;Ruby on Rails applications with Mongrel cluster and Apache url rewriting on Windows &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-1705744926624906573?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1705744926624906573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1705744926624906573'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/10/ruby-on-rails-applications-with-mongrel.html' title='Ruby on Rails applications with Mongrel cluster and Apache url rewriting on Windows'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2937722855105236812</id><published>2008-10-10T13:43:00.000-07:00</published><updated>2008-10-10T13:45:10.797-07:00</updated><title type='text'>mongrel not running on windows</title><content type='html'>&lt;pre&gt;C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in&lt;br /&gt;`gem_original_require': no such file to load -- C:/ruby/lib/ruby/gems/&lt;br /&gt;1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel/init.rb&lt;br /&gt;(MissingSourceFile)&lt;br /&gt;&lt;br /&gt;I did 'gem update mongrel' and it said :&lt;br /&gt;&lt;br /&gt;Successfully installed mongrel-1.1.5-x86-mswin32-60&lt;br /&gt;&lt;br /&gt;I noticed the version of the one installed is later than the one in&lt;br /&gt;the mongrel error message.  Is there an older version of something&lt;br /&gt;that is causing this?&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;I solved this by the following way&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;by changing the name of your&lt;br /&gt;folder C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60  to&lt;br /&gt;C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;and it should work as usual &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2937722855105236812?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2937722855105236812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2937722855105236812'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/10/mongrel-not-running-on-windows.html' title='mongrel not running on windows'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-4887544860233419989</id><published>2008-10-10T09:43:00.000-07:00</published><updated>2008-10-10T09:44:27.432-07:00</updated><title type='text'>How to build Ruby  On Rails  projects using Hudson part -2</title><content type='html'>CI::Reporter is an add-on to Test::Unit and RSpec that allows you to generate XML reports of your test and/or spec runs. The resulting files can be read by a continuous integration system that understands Ant‘s JUnit report XML format, thus allowing your CI system to track test/spec successes and failures.&lt;br /&gt;&lt;h2&gt;Installation&lt;/h2&gt; &lt;p&gt; CI::Reporter is available as a gem. To install the gem, use the usual gem command: &lt;/p&gt; &lt;pre&gt;    gem install ci_reporter&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; To use CI::Reporter as a Rails plugin, first install the gem, and then install the plugin as follows: &lt;/p&gt; &lt;pre&gt;    script/plugin install http://svn.caldersphere.net/svn/main/plugins/ci_reporter&lt;br /&gt;&lt;/pre&gt; &lt;h2&gt;Usage&lt;/h2&gt; &lt;p&gt; CI::Reporter works best with projects that use a &lt;tt&gt;Rakefile&lt;/tt&gt; along with the standard &lt;tt&gt;Rake::TestTask&lt;/tt&gt; or &lt;tt&gt;Spec::Rake::SpecTask&lt;/tt&gt; tasks for running tests or examples, respectively. In this fashion, it hooks into &lt;tt&gt;Test::Unit&lt;/tt&gt; or &lt;tt&gt;RSpec&lt;/tt&gt; using environment variables recognized by these custom tasks to inject the CI::Reporter code into the test or spec runs. If you‘re using the Rails plugin, step 1 is unnecessary; skip to step 2. &lt;/p&gt; &lt;ol&gt;&lt;li&gt;To use CI::Reporter, simply add the following lines to your Rakefile:  &lt;pre&gt; require 'rubygems'&lt;br /&gt;gem 'ci_reporter'&lt;br /&gt;require 'ci/reporter/rake/rspec' # use this if you're using RSpec&lt;br /&gt;require 'ci/reporter/rake/test_unit' # use this if you're using Test::Unit&lt;br /&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;Next, either modify your Rakefile to make the &lt;tt&gt;ci:setup:rspec&lt;/tt&gt; or &lt;tt&gt;ci:setup:testunit&lt;/tt&gt; task a dependency of your test tasks, or include them on the Rake command-line before the name of the task that runs the tests or specs.  &lt;pre&gt; rake ci:setup:testunit test&lt;br /&gt;&lt;/pre&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p&gt; Report files are written, by default, to the &lt;tt&gt;test/reports&lt;/tt&gt; or &lt;tt&gt;spec/reports&lt;/tt&gt; subdirectory of your project. If you wish to customize the location, simply set the environment variable CI_REPORTS (either in the environment, on the Rake command line, or in your Rakefile) to the location where they should go. &lt;/p&gt;&lt;br /&gt;&lt;h2&gt;Source&lt;/h2&gt; &lt;p&gt; You can get the CI::Reporter source using Git, in any of the following ways: &lt;/p&gt; &lt;pre&gt;    git clone git://git.caldersphere.net/ci_reporter.git&lt;br /&gt;   git clone http://git.caldersphere.net/ci_reporter.git&lt;br /&gt;   git clone git://github.com/nicksieger/ci_reporter.git&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-4887544860233419989?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4887544860233419989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4887544860233419989'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/10/how-to-build-ruby-on-rails-projects.html' title='How to build Ruby  On Rails  projects using Hudson part -2'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-5457479913929754097</id><published>2008-10-10T09:21:00.000-07:00</published><updated>2008-10-13T11:01:51.238-07:00</updated><title type='text'>How to build Ruby  On Rails  projects using Hudson</title><content type='html'>&lt;script type="text/javascript"&gt;&lt;br /&gt;digg_url = 'http://reddyonrails.blogspot.com/2008/10/guide-to-building-ruby-on-rails.html';&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt; &lt;br /&gt;&lt;br /&gt;In this guide I'm going to show how to set up a Ruby on Rails project on the Continuous integration server Hudson. I've been using Hudson on Ruby on Rails projects since september and it works really well.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Initial downloads&lt;br /&gt;&lt;br /&gt;The following files are needed besides Java (at least 1.5). Get the latest version of all files and notice that the Hudson file has the extension .war and plugins .hpi. This guide assumes that Ruby, Rake and Svnplugin are already installed and working.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Hudson server application&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Ruby plugin&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Rake&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 130%; font-weight: bold;"&gt;Installation steps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I'm going to install Hudson into c:\Program Files\Hudson.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Copy the hudson.war file to &lt;span style="font-style: italic;"&gt;c:\Program Files\Hudson&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Start Hudson through &lt;span style="font-style: italic;"&gt;"java -DHUDSON_HOME=data -jar hudson.war"&lt;/span&gt;. Verify that you can access Hudson through &lt;a href="http://localhost:8080/"&gt;http://localhost:8080&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Copy the plugins to &lt;span style="font-style: italic;"&gt;c:\Program Files\Hudson\data\plugins&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Stop Hudson by pressing &lt;span style="font-style: italic;"&gt;Ctrl+C&lt;/span&gt; in the command prompt where you started Hudson.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Start Hudson again and you should be set to go.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;span style="font-size: 130%; font-weight: bold;"&gt;Hudson system configuration&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Follow the following steps to configure the tools that Hudson will use in building Your project.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Go to the System configuration at &lt;a href="http://localhost:8080/configure"&gt;http://localhost:8080/configure&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;Click the "New job" link at the home page.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Enter the name &lt;span style="font-style: italic;"&gt;"&lt;/span&gt;Your project&lt;span style="font-style: italic;"&gt;"&lt;/span&gt;, check the &lt;span style="font-style: italic;"&gt;"Build a free-style software project"&lt;/span&gt; and press OK.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;a href="http://2.bp.blogspot.com/_jQ762RWJZOo/SCraWNGdUMI/AAAAAAAAADI/2pVyGmXcpn0/s1600-h/cs-create.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5200208794761384130" src="http://2.bp.blogspot.com/_jQ762RWJZOo/SCraWNGdUMI/AAAAAAAAADI/2pVyGmXcpn0/s400/cs-create.png" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 130%; font-weight: bold;"&gt;Source code management&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assumes thata ur project uses a Subversion SCM. Hudson supports CVS and SVN out of the box, but there are many &lt;a href="http://hudson.gotdns.com/wiki/display/HUDSON/Plugins#Plugins-Sourcecodemanagement"&gt;plugins for other SCMs&lt;/a&gt;. After checking out the files from the repository Hudson will show the new change sets since the previous build in the Build page. A detailed view of change sets can be seen in the Changes page as the name of the developer, files that were changed and the comment for the change. Each change set is linked to the &lt;a href="http://subversion%20repository%20browser/"&gt;subversion repository browser&lt;/a&gt;, so it is easy to browse the actual file that changed.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Press the Subversion radio button to configure the SCM.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Repository URL=&lt;span style="font-style: italic;"&gt;https://xxx.svn.sourceforge.net/svnroot/xxx/trunk/xxx&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Local module directory=&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Press the Advanced button&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Repository Browser=&lt;span style="font-style: italic;"&gt;ViewSVN&lt;/span&gt;, URL=&lt;span style="font-style: italic;"&gt;http://xxx.svn.sourceforge.net/viewvc/xxx/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;a href="http://2.bp.blogspot.com/_jQ762RWJZOo/SCrahNGdUNI/AAAAAAAAADQ/qWhOrkU8PnY/s1600-h/cs-config-scm.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5200208983739945170" src="http://2.bp.blogspot.com/_jQ762RWJZOo/SCrahNGdUNI/AAAAAAAAADQ/qWhOrkU8PnY/s400/cs-config-scm.png" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To test the configuration, press Save and then Build. The source code will be downloaded from the repository and put into the Workspace. If there were any changes in the SCM repository they can be viewed in the Changes page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_jQ762RWJZOo/SCrS19GdT-I/AAAAAAAAABY/CD1eQQrupEk/s1600-h/cs-changelog.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5200200544129208290" src="http://1.bp.blogspot.com/_jQ762RWJZOo/SCrS19GdT-I/AAAAAAAAABY/CD1eQQrupEk/s400/cs-changelog.png" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When the build is completed verify that it has checked out the code by going to the Workspace page. Using the Workspace page you can browse and view the files that has been checked out and it doesn't matter if the files are on the master or on a distributed slave!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When the plugin is avalable it detects your ruby instances installed from your &lt;b&gt;PATH&lt;/b&gt; but it allows you to add other ruby or jruby paths:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://thinkincode.net/assets/2008/5/22/rubyConfigurationOptions.png" width="90%" /&gt;&lt;br /&gt;&lt;br /&gt;Finally you just need to select the &lt;b&gt;&lt;i&gt;Invoke Rake&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;/i&gt; option into the project configuration and select the tasks that you want to Hudson executes:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://thinkincode.net/assets/2008/5/22/jobRakeConfiguration.png" width="100%" /&gt;&lt;br /&gt;&lt;br /&gt;That's it, you are ready to go with Rake, Hudson and &lt;a href="http://clintshank.javadevelopersjournal.com/ci_build_game.htm"&gt;the Continuous&lt;/a&gt; &lt;a href="http://redsolo.blogspot.com/2008/04/start-playing-continuous-integration.html"&gt;Integration Game&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-5457479913929754097?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5457479913929754097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5457479913929754097'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/10/guide-to-building-ruby-on-rails.html' title='How to build Ruby  On Rails  projects using Hudson'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_jQ762RWJZOo/SCraWNGdUMI/AAAAAAAAADI/2pVyGmXcpn0/s72-c/cs-create.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-3859014197775563430</id><published>2008-08-26T12:37:00.000-07:00</published><updated>2008-08-26T12:59:50.087-07:00</updated><title type='text'>RESTful Rails in Short</title><content type='html'>&lt;span style="font-weight: bold;"&gt;What is REST?&lt;/span&gt;&lt;br /&gt;coined by Roy Fielding stands for REpresentational State Transfer&lt;br /&gt;describes an architecture for web apps centered around resources&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;REST constraints&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;client-server&lt;/li&gt;&lt;li&gt;stateless&lt;/li&gt;&lt;li&gt;cache&lt;/li&gt;&lt;li&gt;uniform interface&lt;/li&gt;&lt;li&gt;layered system&lt;/li&gt;&lt;li&gt;code-on-demand&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;REST data elements&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;resource&lt;/li&gt;&lt;li&gt;resource identifier&lt;/li&gt;&lt;li&gt;representation&lt;/li&gt;&lt;li&gt;representation metadata&lt;/li&gt;&lt;li&gt;resource metadata&lt;/li&gt;&lt;li&gt;control data&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Rails resource&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;manipulated via HTTP methods&lt;/li&gt;&lt;li&gt;URL addressable entity&lt;/li&gt;&lt;li style="text-align: left;"&gt;represented in different formats   &lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Rails resource manipulations&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;operation         SQL         REST&lt;br /&gt;create              insert       POST&lt;br /&gt;read                 select       GET&lt;br /&gt;update             update    PUT&lt;br /&gt;delete              delete      DELETE&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Rails resource URLs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Traditional Rails            RESTful Rails&lt;/span&gt;&lt;br /&gt;POST /post/create        POST /post&lt;br /&gt;GET /post/show/1        GET /post/1&lt;br /&gt;POST /post/update/1  PUT /post/1&lt;br /&gt;POST /post/destroy/1 DELETE /post/1&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Creating a resource&lt;/span&gt;&lt;br /&gt;./script/generate scaffold_resource \&lt;br /&gt;post \&lt;br /&gt;title:string \&lt;br /&gt;content:text \&lt;br /&gt;created_at:datetime&lt;br /&gt;&lt;br /&gt;creates&lt;br /&gt;model, views, controller, helper&lt;br /&gt;fixtures, unit tests, functional tests,&lt;br /&gt;migration (fully functional!)&lt;br /&gt;modifies&lt;br /&gt;config/routes.rb&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Model&lt;/span&gt;&lt;br /&gt;app/models/post.rb&lt;br /&gt;class Post &lt; ActiveRecord::Base&lt;br /&gt;end&lt;br /&gt;nothing new!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;View&lt;/span&gt;&lt;br /&gt;app/views/posts/show.rhtml&lt;br /&gt;&lt;p&gt;&lt;b&gt;Title:&lt;/b&gt;&lt;%=h @post.title %&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Content:&lt;/b&gt;&lt;%=h @post.content %&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Created at:&lt;/b&gt;&lt;%=h @post.created_at %&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;%= link_to ‘Edit’, edit_post_path(@post) %&gt; |&lt;br /&gt;&lt;%= link_to ‘Back’, posts_path %&gt;&lt;br /&gt;new syntax for link_to URLs!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Views: routes&lt;/span&gt;&lt;br /&gt;config/routes.rb&lt;br /&gt;ActionController::Routing::Routes.draw do |map|&lt;br /&gt;map.resources :posts&lt;br /&gt;end&lt;br /&gt;defines path methods and URL methods&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Action `````HTTP request````````` Path method&lt;/span&gt;&lt;br /&gt;index           GET /posts                          projects_path&lt;br /&gt;show            GET /posts/1                      project_path(1)&lt;br /&gt;new             GET /posts/new                 new_project_path&lt;br /&gt;edit              GET /posts/1;edit             edit_project_path(1)&lt;br /&gt;create          POST /posts                      projects_path&lt;br /&gt;update         PUT /posts/1                     project_path(1)&lt;br /&gt;delete           DELETE /posts/1             project_path(1)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;new&lt;/span&gt;&lt;br /&gt;form_for(:post, :url =&gt; post_path) ...&lt;br /&gt;edit&lt;br /&gt;form_for(:post, :url =&gt; post_path(@post), \&lt;br /&gt;:html =&gt; {:method =&gt; :put}) ...&lt;br /&gt;destroy&lt;br /&gt;link_to ‘Destroy’, post_path(post), :method =&gt; :delete&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Controller&lt;/span&gt;&lt;br /&gt;app/controllers/posts_controller.rb&lt;br /&gt;def destroy&lt;br /&gt;@post = Post.find(params[:id])&lt;br /&gt;@post.destroy&lt;br /&gt;respond_to do |format|&lt;br /&gt;format.html { redirect_to posts_url }&lt;br /&gt;format.xml { head :ok }&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;uses respond_to and post_url&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Controller: routes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Traditional Rails&lt;br /&gt;redirect_to :controller =&gt; ‘posts’, \&lt;br /&gt;:action =&gt; ‘show’, :id =&gt; @post.id&lt;br /&gt;&lt;br /&gt;RESTful Rails&lt;br /&gt;redirect_to post_url(@post)&lt;br /&gt;Each path method has equivalent URL method&lt;br /&gt;Remember: use URL methods for redirect_to&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Controller: respond_to&lt;/span&gt;&lt;br /&gt;multiple representations of the resource&lt;br /&gt;respond_to uses&lt;br /&gt;accept HTTP-Header of the request&lt;br /&gt;format appended to the request URL&lt;br /&gt;register new formats in config/environment.rb&lt;br /&gt;to extend responds_to&lt;br /&gt;Mime::Type.register ‘image/png’, :png&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Migration&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;db/migrate/001_create_posts.rb&lt;br /&gt;class CreatePosts &lt; ActiveRecord::Migration&lt;br /&gt;def self.up&lt;br /&gt; create_table :posts do |t|&lt;br /&gt; t.column :title, :string&lt;br /&gt; t.column :content, :text&lt;br /&gt; t.column :created_at, :datetime&lt;br /&gt; end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;def self.down&lt;br /&gt; drop_table :posts&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Nested resources&lt;/span&gt;&lt;br /&gt;strongly coupled resources&lt;br /&gt;expressed in the URLs&lt;br /&gt;creating a nested resource&lt;br /&gt;&lt;br /&gt;./script/generate scaffold_resource comment \&lt;br /&gt;post_id:integer created_at:datetime \&lt;br /&gt;author:string content:text&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;models&lt;/span&gt;&lt;br /&gt;models must be edited to express relationship&lt;br /&gt;&lt;br /&gt;app/models/post.rb&lt;br /&gt;&lt;br /&gt;class Post &lt; ActiveRecord::Base&lt;br /&gt;has_many :comments&lt;br /&gt;end&lt;br /&gt;app/models/comment.rb&lt;br /&gt;class Comment &lt; ActiveRecord::Base&lt;br /&gt;belongs_to :post&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;routes&lt;/span&gt;&lt;br /&gt;routes must be edited to reflect relationship&lt;br /&gt;&lt;br /&gt;config/routes.rb&lt;br /&gt;&lt;br /&gt;map.resources :comments&lt;br /&gt;becomes&lt;br /&gt;map.resources :posts do |posts|&lt;br /&gt;posts.resources :comments&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Path method                            Path&lt;/span&gt;&lt;br /&gt;comments_path(1)                  /posts/1/comments&lt;br /&gt;comment_path(1, 2)               /posts/1/comments/2&lt;br /&gt;new_comment_path(1)         /posts/1/comments/new&lt;br /&gt;edit_comment_path(1)         /posts/1/comments/2;edit&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;controller&lt;/span&gt;&lt;br /&gt;nested resources controllers must be adapted&lt;br /&gt;def index&lt;br /&gt;post = Post.find(params[:post_id])&lt;br /&gt;@comments = post.comments.find(:all)&lt;br /&gt;...&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;REST benefits&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;clean URLS&lt;/li&gt;&lt;li&gt;multiple representations&lt;/li&gt;&lt;li&gt;less code&lt;/li&gt;&lt;li&gt;CRUD oriented controllers&lt;/li&gt;&lt;li&gt;clear application design&lt;/li&gt;&lt;li&gt;scalability&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-3859014197775563430?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3859014197775563430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3859014197775563430'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/08/restful-rails-in-short.html' title='RESTful Rails in Short'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-5676035214359587543</id><published>2008-08-22T12:58:00.000-07:00</published><updated>2008-08-22T13:01:48.530-07:00</updated><title type='text'>SQL Injection in Ruby On Rails</title><content type='html'>SQL Injection&lt;br /&gt;One of the most common security holes in web applications is that they pass user input&lt;br /&gt;directly to the database without quoting. Thus, a malicious user can fairly easily run all the SQL&lt;br /&gt;he wants to on the server. An example of this would be a search form submission that is handled&lt;br /&gt;by the following code:&lt;br /&gt;&lt;br /&gt;@courses = Course.find(:conditions =&gt; "name = '#{params[:q]'")&lt;br /&gt;&lt;br /&gt;Now let’s say JHON puts the following string into the search form:&lt;br /&gt;&lt;br /&gt;"science'; delete from courses; --"&lt;br /&gt;&lt;br /&gt;The resulting SQL query will be as follows:&lt;br /&gt;&lt;br /&gt;SELECT * from courses where name = 'science'; delete from courses; --'&lt;br /&gt;&lt;br /&gt;This is a perfectly valid SQL query and will effectively wipe out the whole courses table. Thus,&lt;br /&gt;you should never, ever, pass anything unquoted to the :conditions parameter of ActiveRecord&lt;br /&gt;finders. Instead, use the bind variable syntax:&lt;br /&gt;&lt;br /&gt;@courses = Course.find(:conditions =&gt; ["name = ?", params[:q]])&lt;br /&gt;&lt;br /&gt;You can pass in as many question mark/variable pairs you need. They will be parsed and&lt;br /&gt;quoted in the order they are specified.&lt;br /&gt;&lt;br /&gt;Another option in simple cases is to use the magic finders, where the parameter value is&lt;br /&gt;automatically quoted, too:&lt;br /&gt;@courses = Course.find_by_name(params[:q])&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-5676035214359587543?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/5676035214359587543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=5676035214359587543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5676035214359587543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5676035214359587543'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/08/sql-injection-in-ruby-on-rails.html' title='SQL Injection in Ruby On Rails'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-6847489339934808363</id><published>2008-08-19T10:32:00.000-07:00</published><updated>2008-12-05T08:03:03.845-08:00</updated><title type='text'>Dojo Button and Rails Helpers</title><content type='html'>Dojo Button and Rails Helpers&lt;br /&gt;&lt;br /&gt;When i tried to use dojo buttons on rails partials , i felt happy about dojo widgets.&lt;br /&gt;&lt;br /&gt;But if i have to use save_tag button or i want to include button in link_to_remote function,&lt;br /&gt;I dont have option to get dojo style button.&lt;br /&gt;&lt;br /&gt;I have used firebug to get the required dojo classes for dojo button and created following helper methods.&lt;br /&gt;&lt;br /&gt;def dojo_button(name)&lt;br /&gt;    '&lt;button class="'+dojo_button_class.to_s+'"&gt;'+name.to_s+'&lt;/button&gt;'&lt;br /&gt;  end&lt;br /&gt;  def dojo_button_class&lt;br /&gt;    "dijit dijitLeft dijitInline dijitStretch dijitButtonNode dijitButtonContents dijitButton"&lt;br /&gt;  end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-6847489339934808363?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/6847489339934808363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=6847489339934808363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6847489339934808363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6847489339934808363'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/08/dojo-button-and-rails-helpers.html' title='Dojo Button and Rails Helpers'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-4306044538513534002</id><published>2008-08-19T10:12:00.000-07:00</published><updated>2008-12-05T08:02:05.569-08:00</updated><title type='text'>save_tag to avoid multiple click in IE and Firefox</title><content type='html'>##############################################################################&lt;br /&gt;   # Overrides sumit_tag for disable save after click event  --JAGAN REDDY&lt;br /&gt;   ############################################################################## &lt;br /&gt;   def commit_tag(value,options={})&lt;br /&gt;     options.stringify_keys!&lt;br /&gt;     submit_tag value, options.merge(:onclick =&gt; '&lt;br /&gt;&lt;br /&gt;      if(window.addEventListener)&lt;br /&gt;      {&lt;br /&gt;        this.disabled = true;&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      { // IE&lt;br /&gt;        var element = window.event.srcElement;&lt;br /&gt;        var  tag = element.tagName.toLowerCase();&lt;br /&gt;       if(tag == "input")&lt;br /&gt;        {&lt;br /&gt;          var click = element.onclick;&lt;br /&gt;          var keypress = element.onkeypress;&lt;br /&gt;          setTimeout(function() { element.disabled = true; element.onclick = null; element.onkeypress = null; }, 0);&lt;br /&gt;          setTimeout(function() { element.disabled = false; element.onclick = click; element.onkeypress =keypress; }, 20000);&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;      ')&lt;br /&gt;   end&lt;br /&gt;use this in apllication_helper.rb&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-4306044538513534002?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/4306044538513534002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=4306044538513534002' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4306044538513534002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4306044538513534002'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/08/savetag-to-avoid-multiple-click-in-ie.html' title='save_tag to avoid multiple click in IE and Firefox'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-7029969957554937218</id><published>2008-07-23T16:04:00.000-07:00</published><updated>2008-07-23T16:07:55.582-07:00</updated><title type='text'>Ruby: Floating point round off</title><content type='html'>my method of doing this as&lt;br /&gt;&lt;br /&gt;  def round(float, decimal_places)  # By Jagan  Reddy&lt;br /&gt;    exponent = decimal_places + 2&lt;br /&gt;    @float = float*(10**exponent)&lt;br /&gt;    @float = @float.round&lt;br /&gt;    @float = @float / (10.0**exponent)&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;In short we can also do this way&lt;br /&gt;&lt;pre&gt;class Float&lt;br /&gt; def round_to(i)&lt;br /&gt;   (self * 10**i).round.to_f / 10**i&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;value = 1328.3337&lt;br /&gt;value.round_to(3)&lt;br /&gt;=&gt;1328.334&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-7029969957554937218?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/7029969957554937218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=7029969957554937218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7029969957554937218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7029969957554937218'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/07/ruby-floating-point-round-off.html' title='Ruby: Floating point round off'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-3503802850625824942</id><published>2008-07-11T13:29:00.000-07:00</published><updated>2008-07-11T13:30:27.913-07:00</updated><title type='text'>New AJAX google api rails plugin coming soon</title><content type='html'>Check this link for sample google ajax rails helper modules ...&lt;br /&gt;&lt;br /&gt;http://www.strictlyuntyped.com/2008/06/using-google-ajax-libraries-api-with.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-3503802850625824942?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/3503802850625824942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=3503802850625824942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3503802850625824942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3503802850625824942'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/07/new-ajax-google-api-rails-plugin-coming.html' title='New AJAX google api rails plugin coming soon'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-8205890126000268237</id><published>2008-07-11T13:21:00.000-07:00</published><updated>2008-07-11T13:25:34.999-07:00</updated><title type='text'>Error can't dump anonymous class Class (apatana studio)</title><content type='html'>&lt;span class="code"&gt; The system has a mainDocument model with different subclasses for different types of documents.&lt;br /&gt;With the code below, if I attempt to create a Document, it works fine, but&lt;br /&gt;if I attempt to use one of the subclasses, I get the error:&lt;br /&gt;&lt;br /&gt; can't dump anonymous class Class&lt;br /&gt;&lt;br /&gt;With an Application Trace of:&lt;br /&gt;&lt;br /&gt; C:/Ruby/lib/ruby/1.8/yaml/rubytypes.rb:6:in `to_yaml'&lt;br /&gt;&lt;br /&gt;When i started using aptana studio (radrails) 1.1.6 etc..  i got this error.&lt;br /&gt;&lt;br /&gt;I searched all over the net for rails or ruby error list for this kind..  i could not find this problem any where.&lt;br /&gt;&lt;br /&gt;But it solved when stopped apatana from dubugging mode to regular mode.&lt;br /&gt;&lt;br /&gt;I dont know why but it works me fine afterwards.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;please put your comments if u find any other soultion&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-8205890126000268237?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/8205890126000268237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=8205890126000268237' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8205890126000268237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8205890126000268237'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/07/error-cant-dump-anonymous-class-class.html' title='Error can&apos;t dump anonymous class Class (apatana studio)'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-441882191364240922</id><published>2008-05-21T15:11:00.000-07:00</published><updated>2008-05-21T15:12:15.631-07:00</updated><title type='text'>What is Rubinius ?</title><content type='html'>Evan Phoenix's &lt;a href="http://rubini.us/"&gt;Rubinius&lt;/a&gt; project is an effort to implement Ruby using as much Ruby code as possible. It is not, as professed, "Ruby in Ruby" anymore. Rubinius started out as a 100% Ruby implementation of Ruby that bootstrapped and ran on top of MatzRuby. Over time, though the "Ruby in Ruby" moniker has stuck, Rubinius has become more or less half C and half Ruby. It boasts a stackless bytecode-based VM (compare with Ruby 1.9, which does use the C stack), a "better" generational, compacting garbage collector, and a good bit more Ruby code in the core libraries, making several of the core methods easier to understand, maintain, and implement in the first place.&lt;br /&gt;&lt;br /&gt;The promise of Rubinius is pretty large. If it can be made compatible, and made to run fast, it might represent a better Ruby VM than YARV. Because a fair portion of Rubinius is actually implemented in Ruby, being able to run Ruby code fast would mean all code runs faster. And the improved GC would solve some of the scaling issues Ruby 1.8 and Ruby 1.9 will face.&lt;br /&gt;&lt;br /&gt;Rubinius also brings some other innovations. The one most likely to see general visibility is Rubinius's Multiple-VM API. JRuby has supported MVM from the beginning, since a JRuby runtime is "just another Java object". But Evan has built simple MVM support in Rubinius and put a pretty nice API on it. That API is the one we're currently looking at improving and making standard for user-land MVM in JRuby and Ruby 1.9. Rubinius has also shown that taking a somewhat more Smalltalk-like approach to Ruby implementation is feasible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-441882191364240922?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/441882191364240922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=441882191364240922' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/441882191364240922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/441882191364240922'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/05/what-is-rubinius.html' title='What is Rubinius ?'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-3728173214594940797</id><published>2008-05-21T15:06:00.000-07:00</published><updated>2008-05-21T15:07:06.973-07:00</updated><title type='text'>Rails on Virtual Machine</title><content type='html'>&lt;p&gt;There was a &lt;a href="http://blog.fallingsnow.net/2008/05/17/rails-on-rubinius/"&gt;short note today&lt;/a&gt;, that the Rubinius development team has successfully run Rails on their virtual machine. Although isn’t anywhere new production ready yet, it is a significant step forward in getting a faster Rails.&lt;/p&gt; &lt;p&gt;I covered some of the &lt;a href="http://www.sitepoint.com/blogs/2008/03/10/altruby/"&gt;alternate Ruby&lt;/a&gt; implementations previously. &lt;/p&gt; &lt;p&gt;Congratulations to the team!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-3728173214594940797?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/3728173214594940797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=3728173214594940797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3728173214594940797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3728173214594940797'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/05/rails-on-virtual-machine.html' title='Rails on Virtual Machine'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2468062543559970585</id><published>2008-05-21T15:00:00.000-07:00</published><updated>2008-05-21T15:01:13.842-07:00</updated><title type='text'>Rails Development Tips part-2</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Use database indexes&lt;/strong&gt; to speed up queries. Rails only indexes primary keys, so you’ll have to find the spots that need more attention.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Profile your code&lt;/strong&gt;. The &lt;a href="http://cfis.savagexi.com/articles/category/ruby-prof"&gt;ruby-prof gem and plugin&lt;/a&gt; helped me make an application three times faster with only minimal changes to the code.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Minimize graphic-related dependencies&lt;/strong&gt;. If your application only needs to make a few thumbnails, don’t waste memory by importing large graphics libraries. Look at &lt;a href="http://rubyforge.org/projects/mini-magick"&gt;mini-magick&lt;/a&gt; or &lt;a href="http://seattlerb.rubyforge.org/ImageScience.html"&gt;image_science&lt;/a&gt; for lightweight thumbnailing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid&lt;/strong&gt; excessive repeated rendering of &lt;strong&gt;small partials&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use &lt;span class="caps"&gt;CSS&lt;/span&gt;&lt;/strong&gt; instead of inline tags to apply selective styling.&lt;/li&gt;&lt;li&gt;Don’t use ActiveRecord’s &lt;code&gt;serialize&lt;/code&gt; option to store &lt;strong&gt;large objects&lt;/strong&gt; in database fields.&lt;/li&gt;&lt;li&gt;Use &lt;code&gt;attr_protected :fieldname&lt;/code&gt; in models to keep database fields from being manipulated from forms (or from any calls to &lt;code&gt;Model.update_attributes(params[:model])&lt;/code&gt;).&lt;/li&gt;&lt;li&gt;Use Ruby &lt;strong&gt;classes and inheritance&lt;/strong&gt; to refactor repeated controller code.&lt;/li&gt;&lt;li&gt;Use &lt;strong&gt;unobtrusive Javascripting&lt;/strong&gt; techniques to separate behavior from markup.&lt;/li&gt;&lt;li&gt;Package self-sufficient classes and modules as &lt;strong&gt;plugins or RubyGems&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cache&lt;/strong&gt; frequently accessed data and rendered content where possible.&lt;/li&gt;&lt;li&gt;Write &lt;strong&gt;custom&lt;/strong&gt; Test::Unit &lt;strong&gt;assertions&lt;/strong&gt; or rSpec &lt;strong&gt;matchers&lt;/strong&gt; to help with debugging test suite errors.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Rotate&lt;/strong&gt; the Rails and Mongrel logfiles using the &lt;code&gt;logrotate&lt;/code&gt; daemon on Linux.&lt;/li&gt;&lt;li&gt;Build a reliable &lt;strong&gt;backup&lt;/strong&gt; system.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Automate deployment&lt;/strong&gt; and maintenance with Capistrano or Vlad.&lt;/li&gt;&lt;li&gt;Keep &lt;strong&gt;method bodies short&lt;/strong&gt;. If a method is more than 10 lines long, it’s time to break it down and refactor.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Run flog&lt;/strong&gt; to determine overly complex methods and clases.&lt;/li&gt;&lt;li&gt;Don’t use &lt;strong&gt;too many conditionals&lt;/strong&gt;. Take advantage of &lt;code&gt;case&lt;/code&gt; statements and Ruby objects to filter instead of multiply-nested &lt;code&gt;if&lt;/code&gt; statements.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t be too clever&lt;/strong&gt;. Ruby has great metaprogramming features, but they are easy to overuse (such as &lt;code&gt;eval&lt;/code&gt; and &lt;code&gt;method_missing&lt;/code&gt;).&lt;/li&gt;&lt;li&gt;Become familiar with the most &lt;strong&gt;popular plugins&lt;/strong&gt;. Instead of re-implementing the wheel, save yourself some time by using well tested, popular plugins&lt;/li&gt;&lt;/ul&gt;source :http://nubyonrails.com/articles/massive-list-of-rails-development-tips&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2468062543559970585?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/2468062543559970585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=2468062543559970585' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2468062543559970585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2468062543559970585'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/05/rails-development-tips-part-2.html' title='Rails Development Tips part-2'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-8245393875040250916</id><published>2008-05-21T14:59:00.000-07:00</published><updated>2008-05-21T15:00:17.738-07:00</updated><title type='text'>Rails Development Tips or Hints part 1</title><content type='html'>&lt;ul&gt;&lt;li&gt;Store sessions in the database (or at least not on disk, which is the default).&lt;/li&gt;&lt;li&gt;Use a custom configuration file for passwords and &lt;span class="caps"&gt;API&lt;/span&gt; keys instead of storing them in your Subversion repository. I use &lt;span class="caps"&gt;YAML&lt;/span&gt; and mirror the style of database.yml.&lt;/li&gt;&lt;li&gt;Use constants where needed. Instead of repeating strings like the address of your customer service reply email, set it once in a constant (in environment.rb or the appropriate environment file) and use that throughout your application.&lt;/li&gt;&lt;li&gt;Keep time in &lt;span class="caps"&gt;UTC&lt;/span&gt;. A no brainer, and easy to do.&lt;/li&gt;&lt;li&gt;Don’t loop through ActiveRecord models inside other models. Use eager loading if you need to work with multiple associated models. Better yet, write a custom &lt;span class="caps"&gt;SQL&lt;/span&gt; query and let the database do the work for you.&lt;/li&gt;&lt;li&gt;Beware of binary fields. By default, all fields are returned with queries, including the full contents of any binary fields. Use &lt;code&gt;:select&lt;/code&gt; to pull out only the fields you need.&lt;/li&gt;&lt;li&gt;Write tables to cache data for reports that span months and years. It’s much faster than re-generating a year’s worth of reports every time a page is loaded.&lt;/li&gt;&lt;li&gt;Create a table with a list of country names. By default, Rails uses strings for selects and lists of countries, which doesn’t work well for reporting or database consistency between models.&lt;/li&gt;&lt;li&gt;Avoid bloated controllers. Instead of piling actions into a controller, limit yourself to 10 actions per controller, then rethink your design.&lt;/li&gt;&lt;li&gt;Keep your controllers and views skinny. In general, most of your code should be in your models, not your controllers or views.&lt;/li&gt;&lt;li&gt;Don’t store objects in the session. Use integers or short strings if necessary, then pull the appropriate object out of the database for the duration of a single request.&lt;/li&gt;&lt;li&gt;Avoid heavy response processing. Can you mark a record as needing to be processed, then use a cron job or a messaging server to do the long-running work? BackgroundRB is also an option. (I use this technique for filtering &lt;span class="caps"&gt;SPAM&lt;/span&gt; comments on this blog).&lt;/li&gt;&lt;li&gt;Use ar_mailer to queue bulk emails instead of sending them during the Rails response cycle.&lt;/li&gt;&lt;li&gt;Monitor your servers with the exception_notification plugin, munin, monit, or other tools.&lt;/li&gt;&lt;li&gt;Don’t cut costs on hardware. You’ll quickly lose the money you thought you were saving if your developers have to spend even one day a month on unexpected server maintenance due to poor backups or cheap hardware.&lt;/li&gt;&lt;li&gt;Test-drive your development.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-8245393875040250916?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/8245393875040250916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=8245393875040250916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8245393875040250916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8245393875040250916'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2008/05/rails-development-tips-or-hints-part-1.html' title='Rails Development Tips or Hints part 1'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-3821795637758319074</id><published>2007-12-27T12:44:00.000-08:00</published><updated>2007-12-27T12:49:11.255-08:00</updated><title type='text'>If, Else, and Elsif Constructs</title><content type='html'>Too many if else statements can create confusion for ruby developers. If so better to refactor the code. Ruby is such an amazing object oriented language that this procedural garbage is the quickest way to ugly, unreadable code.&lt;br /&gt;&lt;br /&gt;if you ever write something like this:      &lt;table class="CodeRay"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;&lt;br /&gt;&lt;/tt&gt;2&lt;tt&gt;&lt;br /&gt;&lt;/tt&gt;3&lt;tt&gt; &lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;   &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;&lt;span class="r"&gt;if&lt;/span&gt; my_object!= my_object_not&lt;span class="c"&gt;&lt;/span&gt;&lt;tt&gt;&lt;br /&gt;&lt;/tt&gt;&lt;span class="r"&gt;if&lt;/span&gt; my_object!= &lt;span class="pc"&gt;nil&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;If you wanna take the advantage of ruby use the following code for better readability&lt;br /&gt;&lt;br /&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;&lt;span class="r"&gt;unless&lt;/span&gt; my_object== my_object_else&lt;span class="c"&gt;&lt;/span&gt;&lt;tt&gt;&lt;br /&gt;&lt;/tt&gt;&lt;span class="r"&gt;unless&lt;/span&gt; my_object.nil?&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-3821795637758319074?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/3821795637758319074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=3821795637758319074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3821795637758319074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3821795637758319074'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/12/if-else-and-elsif-constructs.html' title='If, Else, and Elsif Constructs'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2240749556921951875</id><published>2007-12-27T12:36:00.000-08:00</published><updated>2007-12-27T12:42:56.097-08:00</updated><title type='text'>ActiveRecord partial updates</title><content type='html'>&lt;em&gt;ActiveRecord&lt;/em&gt; updates all the columns when you &lt;em&gt;save&lt;/em&gt; the object, without bothering to see if the column was changed or not.&lt;br /&gt;&lt;br /&gt;Pratik Naik has given the solution for partial updates on changes.&lt;br /&gt;&lt;br /&gt;http://m.onkey.org/2007/12/18/partial-updates&lt;br /&gt;&lt;br /&gt;Make sure that you use optimistic locking.&lt;br /&gt;&lt;br /&gt;Active Records support optimistic locking if the field &lt;tt&gt;lock_version&lt;/tt&gt; is present. Each update to the record increments the lock_version column and the locking facilities ensure that records instantiated twice will let the last one saved raise a &lt;a href="http://api.rubyonrails.org/classes/ActiveRecord/StaleObjectError.html"&gt;StaleObjectError&lt;/a&gt; if the first was also updated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2240749556921951875?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/2240749556921951875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=2240749556921951875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2240749556921951875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2240749556921951875'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/12/activerecord-partial-updates.html' title='ActiveRecord partial updates'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2262249214036604883</id><published>2007-12-20T08:18:00.000-08:00</published><updated>2007-12-20T08:23:33.211-08:00</updated><title type='text'>Rails Plugins - Query Analyzer</title><content type='html'>&lt;h2 style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt; The Query Analyzer plugin will expand the usability of your log files by providing query analysis using the MySQL query execution plan. Each SQL select query will be ‘EXPLAIN’ed and added to the log files right below the original query.&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;Installation&lt;/h2&gt;script/plugin install &lt;a href="http://svn.nfectio.us/plugins/query_analyzer"&gt;http://svn.nfectio.us/plugins/query_analyzer&lt;/a&gt;&lt;h2&gt;Example Use&lt;/h2&gt; Refer to &lt;a href="http://www.mysql.org/doc/refman/5.0/en/explain.html"&gt;http://www.mysql.org/doc/refman/5.0/en/explain.html&lt;/a&gt; for more information on understanding the results.&lt;br /&gt;&lt;br /&gt;&lt;p&gt; &lt;a href="http://www.rubyinside.com/columnized-text-datasets-in-rails-71.html"&gt;http://www.rubyinside.com/columnized-text-datasets-in-rails-71.html&lt;/a&gt; &lt;a href="http://habtm.com/articles/2006/06/10/pretty-tables-for-ruby-objects"&gt;http://habtm.com/articles/2006/06/10/pretty-tables-for-ruby-objects&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2262249214036604883?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/2262249214036604883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=2262249214036604883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2262249214036604883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2262249214036604883'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/12/rails-plugins-query-analyzer.html' title='Rails Plugins - Query Analyzer'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-6253045007847017537</id><published>2007-12-19T14:48:00.000-08:00</published><updated>2007-12-19T14:49:25.571-08:00</updated><title type='text'>Latest bug fixes for ruby pdf-writer 1.1.4</title><content type='html'>* Better memory footprint for PDF::SimpleTable&lt;br /&gt; * Fixed an error with BMP images in ImageInfo#measure_BMP&lt;br /&gt; * Temporary removal of encryption functionality, as it seems to have&lt;br /&gt;numerous issues&lt;br /&gt; * Resolved  an issue with ordering of column names in PDF::SimpleTable&lt;br /&gt; * Resolved an issue with shading in PDF::SimpleTable&lt;br /&gt; * Applied a patch to allow toggling visible column separators in QuickRef&lt;br /&gt; * Partially fixed issues with page numbering&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-6253045007847017537?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/6253045007847017537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=6253045007847017537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6253045007847017537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6253045007847017537'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/12/latest-bug-fixes-for-ruby-pdf-writer.html' title='Latest bug fixes for ruby pdf-writer 1.1.4'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-8853536890110532631</id><published>2007-12-19T14:46:00.000-08:00</published><updated>2007-12-19T14:47:07.279-08:00</updated><title type='text'>rubyvmware-0.3-release</title><content type='html'>Rewrite all initialization codes. More OO and rubish.&lt;br /&gt;Add VMware::VM class with poweron,poweroff,reset,suspend methods.&lt;br /&gt;Try to move to VIX 1.2.&lt;br /&gt;&lt;br /&gt;Track latest rubyvmware: &lt;a href="http://rubyvmware.rubyforge.org/" target="_new"&gt;http://rubyvmware.rubyforge.org&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-8853536890110532631?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/8853536890110532631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=8853536890110532631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8853536890110532631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8853536890110532631'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/12/rubyvmware-03-release.html' title='rubyvmware-0.3-release'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-1839150431457327686</id><published>2007-12-19T14:42:00.000-08:00</published><updated>2007-12-19T14:45:39.096-08:00</updated><title type='text'>Ruby gem youtube-g version 0.4.0 has been released!</title><content type='html'>&lt;span style="color: rgb(51, 102, 255);"&gt;Aims to be in parity with Google's YouTube GData API&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Basic queries:&lt;br /&gt;&lt;br /&gt;@client = YouTubeG::Client.new&lt;br /&gt;@client.videos_by(:query =&gt; "penguin")&lt;br /&gt;@client.videos_by(:tags =&gt; ['tiger', 'leopard'])&lt;br /&gt;@client.videos_by(:categories =&gt; [:news, :sports])&lt;br /&gt;@client.videos_by(:categories =&gt; [:news, :sports], :tags =&gt; ['soccer', 'football'])&lt;br /&gt;@client.videos_by(:user =&gt; 'liz')&lt;br /&gt;&lt;br /&gt;Standard feeds:&lt;br /&gt;&lt;br /&gt;@client.videos_by(:most_viewed)&lt;br /&gt;@client.videos_by(:top_rated, :time =&gt; :today)&lt;br /&gt;&lt;br /&gt;Advanced queries (with boolean operators OR (either), AND (include), NOT (exclude)):&lt;br /&gt;&lt;br /&gt;@client.videos_by(:categories =&gt; { :either =&gt; [:news, :sports], :exclude =&gt; [:comedy] }, :tags =&gt; { :include =&gt; ['football'], :exclude =&gt; ['soccer'] })&lt;br /&gt;&lt;br /&gt;## INSTALL&lt;a href="javascript:void(0)" tabindex="10" onclick="return false;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; * sudo gem install youtube-g&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-1839150431457327686?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/1839150431457327686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=1839150431457327686' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1839150431457327686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1839150431457327686'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/12/youtube-g-version-040-has-been-released.html' title='Ruby gem youtube-g version 0.4.0 has been released!'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-1918398799520477828</id><published>2007-12-10T15:09:00.001-08:00</published><updated>2007-12-10T15:09:25.779-08:00</updated><title type='text'>Just One Word about RailsConf Europe</title><content type='html'>&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Y40COA81fLE&amp;amp;rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Y40COA81fLE&amp;amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-1918398799520477828?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/1918398799520477828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=1918398799520477828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1918398799520477828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1918398799520477828'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/12/just-one-word-about-railsconf-europe.html' title='Just One Word about RailsConf Europe'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2231264755406736518</id><published>2007-12-10T14:56:00.000-08:00</published><updated>2007-12-10T14:59:12.146-08:00</updated><title type='text'>The First Rails 2.0 Screencast (english)</title><content type='html'>&lt;embed src="http://www.veoh.com/videodetails2.swf?permalinkId=v1615377yFYYmYwm&amp;amp;id=anonymous&amp;amp;player=videodetailsembedded&amp;amp;videoAutoPlay=0" allowfullscreen="true" width="540" height="438" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br/&gt;&lt;a href="http://www.veoh.com/"&gt;Online Videos by Veoh.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2231264755406736518?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/2231264755406736518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=2231264755406736518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2231264755406736518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2231264755406736518'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/12/first-rails-20-screencast-english.html' title='The First Rails 2.0 Screencast (english)'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-507740077107031069</id><published>2007-11-29T15:03:00.000-08:00</published><updated>2007-11-29T15:04:36.645-08:00</updated><title type='text'>Calculating Time difference in Ruby</title><content type='html'>require 'date'&lt;br /&gt;now = DateTime.new&lt;br /&gt;date = Date.new&lt;br /&gt;p now.strftime("%Y-%m-%d %I:%M:%S").to_s&lt;br /&gt;p Time.now.strftime("%Y-%m-%d %I:%M:%S").to_s&lt;br /&gt;dif = DateTime.parse(Time.now.strftime("%Y-%m-%d %I:%M:%S").to_s)-DateTime.parse("2007-9-12 14:07:00")&lt;br /&gt;hours, mins, secs, ignore_fractions = Date::day_fraction_to_time(dif)&lt;br /&gt;p  hours * 60 * 60 + mins * 60 + secs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-507740077107031069?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/507740077107031069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=507740077107031069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/507740077107031069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/507740077107031069'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/11/calculatind-time-difference-in-ruby.html' title='Calculating Time difference in Ruby'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-7021188865343968432</id><published>2007-11-20T13:11:00.000-08:00</published><updated>2007-11-20T13:20:34.366-08:00</updated><title type='text'>Pdf-writer   -- Images in simple table</title><content type='html'>When using pdf-writer using ruby programming language, simple table always gives option of using text in the rows. I did not have an option to use images inside simple table as it uses data as&lt;br /&gt;&lt;br /&gt;attr_accessor :data&lt;br /&gt;# An array of Hash entries. Each row is a Hash where the keys are the&lt;br /&gt;    # names of the columns as specified in #column_order and the values are&lt;br /&gt;    # the values of the cell.&lt;br /&gt;&lt;br /&gt;The following is the code change in simpletable.rb file is required to use images in respected cells.&lt;br /&gt;&lt;br /&gt;line : 647&lt;br /&gt; if(line.match("::Image"))&lt;br /&gt;                      pic = line.gsub("::Image","")&lt;br /&gt;                      line = pdf.add_image_from_file(pic,pos[name], pdf.y-5, @image_width)&lt;br /&gt;                      line =""&lt;br /&gt;                    else&lt;br /&gt;                    line = pdf.add_text_wrap(pos[name], pdf.y,&lt;br /&gt;                                             max_width[name], line,&lt;br /&gt;                                             @font_size, just)&lt;br /&gt;                    end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: Make sure that text should have "::Image" and remaing text is the path of the image .&lt;br /&gt;&lt;br /&gt;like&lt;br /&gt;&lt;br /&gt;data[i]["Q1Image"] ="::Image"+Dir.getwd+"/public/images/status_#{p.status_q1_image}.jpg"&lt;br /&gt;&lt;br /&gt;For more information please post your comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-7021188865343968432?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/7021188865343968432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=7021188865343968432' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7021188865343968432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7021188865343968432'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/11/pdf-writer-images-in-simple-table.html' title='Pdf-writer   -- Images in simple table'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2600012113546447929</id><published>2007-11-09T13:49:00.000-08:00</published><updated>2007-11-09T13:50:35.667-08:00</updated><title type='text'>Anand Agarawala: BumpTop desktop is a beautiful mess</title><content type='html'>&lt;!--cut and paste--&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="432" height="285" id="VE_Player" align="middle"&gt;&lt;param name="movie" value="http://static.videoegg.com/ted/flash/loader.swf"&gt;&lt;param name="FlashVars" value="bgColor=FFFFFF&amp;amp;file=http://static.videoegg.com/ted/movies/ANANDAGARAWALA-2007_high.flv&amp;amp;autoPlay=false&amp;amp;fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&amp;amp;forcePlay=false&amp;amp;logo=&amp;amp;allowFullscreen=true"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="scale" value="noscale"&gt;&lt;param name="wmode" value="window"&gt;&lt;embed src="http://static.videoegg.com/ted/flash/loader.swf" flashvars="bgColor=FFFFFF&amp;amp;file=http://static.videoegg.com/ted/movies/ANANDAGARAWALA-2007_high.flv&amp;amp;autoPlay=false&amp;amp;fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&amp;amp;forcePlay=false&amp;amp;logo=&amp;amp;allowFullscreen=true" quality="high" allowscriptaccess="always" bgcolor="#FFFFFF" scale="noscale" wmode="window" width="432" height="285" name="VE_Player" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2600012113546447929?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/2600012113546447929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=2600012113546447929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2600012113546447929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2600012113546447929'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/11/anand-agarawala-bumptop-desktop-is.html' title='Anand Agarawala: BumpTop desktop is a beautiful mess'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-7027390260964187627</id><published>2007-05-01T10:42:00.000-07:00</published><updated>2007-05-01T10:43:19.312-07:00</updated><title type='text'>Ruby and Related Links</title><content type='html'>http://www.oreillynet.com/ruby/blog/2006/05/post.html&lt;br /&gt;(Zed on Ruby, Rails, Mongrel, and More)&lt;br /&gt;Rails:&lt;br /&gt;http://www-128.ibm.com/developerworks/java/library/j-cb08016/&lt;br /&gt;&lt;br /&gt;Rails Deployment:&lt;br /&gt;http://blog.duncandavidson.com/2005/12/deploying_rails.html&lt;br /&gt;http://www.infoq.com/news/2006/12/deploy-rails-on-iis&lt;br /&gt;&lt;br /&gt;Rails Migrations:&lt;br /&gt;http://glu.ttono.us/articles/2005/10/27/the-joy-of-migrations&lt;br /&gt;http://garrettsnider.backpackit.com/pub/367902&lt;br /&gt;&lt;br /&gt;Scriptaculous Rails:&lt;br /&gt;http://script.aculo.us/&lt;br /&gt;http://www.juixe.com/techknow/index.php/2006/08/12/scriptaculous-rails/&lt;br /&gt;&lt;br /&gt;Rest:&lt;br /&gt;http://www.b-simple.de/documents&lt;br /&gt;&lt;br /&gt;Second Life:&lt;br /&gt;http://secondthoughts.typepad.com/second_thoughts/2006/06/getting_started.html&lt;br /&gt;http://nwn.blogs.com/&lt;br /&gt;&lt;br /&gt;Design Patterns:&lt;br /&gt;http://www.dofactory.com/Patterns/Patterns.aspx&lt;br /&gt;&lt;br /&gt;Agile SD:&lt;br /&gt;http://www.adaptivesd.com/articles/cross_oct02.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-7027390260964187627?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/7027390260964187627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=7027390260964187627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7027390260964187627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7027390260964187627'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/05/ruby-and-related-links.html' title='Ruby and Related Links'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-7792987688852386263</id><published>2007-01-14T09:16:00.000-08:00</published><updated>2007-01-14T09:19:34.315-08:00</updated><title type='text'>Arjun Singh and the Love Goddess!</title><content type='html'>&lt;p&gt;So what does the Love Goddess have to do with Arjun Singh and with reservations? As the Indian government, at the behest of Arjun Singh, rolled out yet another short sighted policy to deal with the horrible caste system, we found out about some other activities of Arjun Singh.&lt;br /&gt;&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;br /&gt;&lt;br /&gt;&lt;param name="movie" value="http://www.youtube.com/v/tAaFfBUFXxQ"&gt;&lt;embed src="http://www.youtube.com/v/tAaFfBUFXxQ" type="application/x-shockwave-flash" height="350" width="425"&gt;&lt;/object&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-7792987688852386263?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/7792987688852386263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=7792987688852386263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7792987688852386263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7792987688852386263'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2007/01/arjun-singh-and-love-goddess.html' title='Arjun Singh and the Love Goddess!'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-7681159812564462304</id><published>2006-12-28T08:31:00.000-08:00</published><updated>2006-12-28T08:32:52.203-08:00</updated><title type='text'>ExampleDesignPatternsInRuby   (Ruby)</title><content type='html'>&lt;p&gt; Almost all of these examples are correct Ruby programs. If example output is shown, you should be able to copy code from the web page, run it in a Ruby interpreter and get the documented output.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Patterns&lt;/strong&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/AbstractFactoryPattern" class="wikipagelink"&gt;AbstractFactoryPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/AbstractSessionPattern" class="wikipagelink"&gt;AbstractSessionPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/AdaptorPattern" class="wikipagelink"&gt;AdaptorPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/BouncerPattern" class="wikipagelink"&gt;BouncerPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/ChainOfResponsibilityPattern" class="wikipagelink"&gt;ChainOfResponsibilityPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/CommandPattern" class="wikipagelink"&gt;CommandPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/CompositePattern" class="wikipagelink"&gt;CompositePattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/DecoratorPattern" class="wikipagelink"&gt;DecoratorPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/DelegatorPattern" class="wikipagelink"&gt;DelegatorPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/FactoryMethodPattern" class="wikipagelink"&gt;FactoryMethodPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/FlyweightPattern" class="wikipagelink"&gt;FlyweightPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/IteratorPattern" class="wikipagelink"&gt;IteratorPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/NullObjectPattern" class="wikipagelink"&gt;NullObjectPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/ObserverPattern" class="wikipagelink"&gt;ObserverPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/ProductTraderPattern" class="wikipagelink"&gt;ProductTraderPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/ProxyPattern" class="wikipagelink"&gt;ProxyPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/RepositoryPattern" class="wikipagelink"&gt;RepositoryPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/SingletonPattern" class="wikipagelink"&gt;SingletonPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/StatePattern" class="wikipagelink"&gt;StatePattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/StrategyPattern" class="wikipagelink"&gt;StrategyPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/TemplateMethodPattern" class="wikipagelink"&gt;TemplateMethodPattern&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.rubygarden.org/Ruby/page/show/VisitorPattern" class="wikipagelink"&gt;VisitorPattern&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; Source:http://wiki.rubygarden.org/Ruby/page/show/ExampleDesignPatternsInRuby&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-7681159812564462304?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/7681159812564462304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=7681159812564462304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7681159812564462304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7681159812564462304'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/exampledesignpatternsinruby-ruby.html' title='ExampleDesignPatternsInRuby   (Ruby)'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-1196412146320684621</id><published>2006-12-28T08:28:00.000-08:00</published><updated>2006-12-28T08:29:18.020-08:00</updated><title type='text'>Design Patterns in Ruby : Observer</title><content type='html'>The key ideas around the Ruby implementation of the Observer pattern are: &lt;ol&gt;&lt;li&gt;Require the observer library&lt;/li&gt;&lt;li&gt;Mixin the &lt;b&gt;Observable&lt;/b&gt; module to your class which can be observed&lt;/li&gt;&lt;li&gt;In the class that does the observing, implement the &lt;b&gt;update&lt;/b&gt; method&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;That’s it.&lt;/p&gt; &lt;p&gt;Of course, an example would be nice.  Here’s a small one.&lt;/p&gt; &lt;pre&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;require 'observer'  # Key step 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;class MyObservableClass&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;  include Observable  # Key step 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;  def blah&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    changed  # note that our state has changed&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    notify_observers( 5 )&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;  end&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;class MyObserverClass&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;  def update(new_data)  # Key step 3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;    puts "The new data is #{new_data}"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;  end&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;watcher = MyObservableClass.new&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;watcher.add_observer(MyObserverClass.new)&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Now, any time that &lt;span style="font-style: italic;"&gt;MyObservableClass#blah&lt;/span&gt; is called, the observing classes will get notified. In this example, we aren’t dynamically changing the data (in fact, it always stays constant), but I think you can see that if in fact the data DID change, the observers would all get notified of that change. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-1196412146320684621?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/1196412146320684621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=1196412146320684621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1196412146320684621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/1196412146320684621'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/design-patterns-in-ruby-observer.html' title='Design Patterns in Ruby : Observer'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-6888035017115214662</id><published>2006-12-28T08:17:00.000-08:00</published><updated>2006-12-28T08:26:17.696-08:00</updated><title type='text'>Design Patterns in Ruby : Singleton</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Singleton pattern in Ruby&lt;/span&gt; just simple. Only thing is you need to include singleton module. Lets look at sample ruby program.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;require 'singleton'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;class MyClass&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;  include Singleton&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;sing Ruby’s powerful &lt;span style="font-weight: bold;"&gt;Mixin &lt;/span&gt;functionality, we bring the singleton code into our class definition. This automatically makes our class’s &lt;span style="font-style: italic;"&gt;new method private&lt;/span&gt;, and give us an instance method we can use to get our object:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;irb(main):005:0&gt; a = MyClass.new&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;NoMethodError: private method `new' called for MyClass:Class&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;        from (irb):5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;irb(main):006:0&gt; a = MyClass.instance&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;=&gt; #&lt;myclass:0x20a1cc&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-6888035017115214662?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/6888035017115214662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=6888035017115214662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6888035017115214662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6888035017115214662'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/design-patterns-in-ruby-singleton.html' title='Design Patterns in Ruby : Singleton'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-4335150365617512598</id><published>2006-12-13T12:28:00.000-08:00</published><updated>2006-12-13T12:32:08.371-08:00</updated><title type='text'>Ajax Stories Using Microsoft ATLAS</title><content type='html'>&lt;embed src="http://images.soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="612" height="462" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=784e3950-c938-4d9e-b964-0df1f03bfe4c" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=784e3950-c938-4d9e-b964-0df1f03bfe4c" target="_new" title="Using Microsoft Atlas 01"&gt;Video: Using Microsoft Atlas 01&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;embed src="http://images.soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="612" height="462" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=19c80397-9be3-4747-ba0c-8b02e85a1f51" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=19c80397-9be3-4747-ba0c-8b02e85a1f51" target="_new" title="Using Microsoft Atlas 02"&gt;Video: Using Microsoft Atlas 02&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;embed src="http://images.soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="612" height="462" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=bb990d58-6893-4ab0-9d29-831cdaf40942" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=bb990d58-6893-4ab0-9d29-831cdaf40942" target="_new" title="Using Microsoft Atlas 03"&gt;Video: Using Microsoft Atlas 03&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-4335150365617512598?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/4335150365617512598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=4335150365617512598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4335150365617512598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4335150365617512598'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/ajax-stories-using-microsoft-atlas.html' title='Ajax Stories Using Microsoft ATLAS'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-8660700886653932971</id><published>2006-12-13T12:25:00.000-08:00</published><updated>2006-12-13T12:26:50.256-08:00</updated><title type='text'>Building a Blog with Rails</title><content type='html'>&lt;embed src="http://images.soapbox.msn.com/flash/soapbox1_1.swf" quality="high" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;amp;v=1d151e53-2c45-4037-9a32-e16a5d081dff" height="362" width="412"&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=1d151e53-2c45-4037-9a32-e16a5d081dff" target="_new" title="Building a Blog with Rails"&gt;Video: Building a Blog with Rails&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-8660700886653932971?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/8660700886653932971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=8660700886653932971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8660700886653932971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8660700886653932971'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/building-blog-with-rails.html' title='Building a Blog with Rails'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-6696315871380473892</id><published>2006-12-13T11:57:00.000-08:00</published><updated>2006-12-13T12:03:16.963-08:00</updated><title type='text'>What is Chrome URL ?</title><content type='html'>You can get XUL files like regular HTTP URL or like HTML files.&lt;br /&gt;URL types can automatically handle mulitple themes and locales.&lt;br /&gt;The basic syntax of a chrome URL is as follows:&lt;br /&gt;&lt;br /&gt;chrome://&lt;package name=""&gt;/&lt;part&gt;/&lt;file.xul&gt;&lt;br /&gt;&lt;br /&gt;The text &lt;package name=""&gt; is the package name, such as messenger or editor. The &lt;part&gt; is either 'content', 'skin' or 'locale' depending on which part you want. 'file.xul' is simply the filename.&lt;br /&gt;&lt;br /&gt;Example: chrome://messenger/content/messenger.xul&lt;br /&gt;&lt;br /&gt;&lt;/part&gt;&lt;/package&gt;&lt;/file.xul&gt;&lt;/part&gt;&lt;/package&gt;&lt;p&gt; When you select a chrome URL, Mozilla looks down its list of installed packages and tries to locate the &lt;span style="font-style: italic;"&gt;JAR file or directory&lt;/span&gt; that matches the package name and part.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The &lt;span style="font-weight: bold;"&gt;mapping &lt;/span&gt;between chrome &lt;span style="font-weight: bold;"&gt;URLs &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;JAR &lt;/span&gt;files are specified in the &lt;span style="font-weight: bold;"&gt;manifest &lt;/span&gt;files stored in the chrome directory.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If you were to move the file &lt;span style="font-weight: bold;"&gt;messenger.jar&lt;/span&gt; somewhere else and &lt;span style="font-weight: bold;"&gt;update the manifest file&lt;/span&gt; accordingly, Thunderbird will still work since it doesn't rely on its specific installed location. By using chrome URLs we can leave details like this to Mozilla. Similarly, if the user changes their theme, the 'skin' part of the chrome URL translates to a different set of files, yet the XUL and scripts don't need to change. &lt;/p&gt;  &lt;p&gt; Here are some &lt;span style="font-weight: bold;"&gt;more examples&lt;/span&gt;. Note how none of the URLs specify which theme or locale is used and none specify a specific directory. &lt;/p&gt;&lt;p&gt;  &lt;/p&gt; chrome://messenger/content/messenger.xul&lt;br /&gt;chrome://messenger/content/attach.js&lt;br /&gt;chrome://messenger/skin/icons/folder-inbox.png&lt;br /&gt;chrome://messenger/locale/messenger.dtd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-6696315871380473892?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/6696315871380473892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=6696315871380473892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6696315871380473892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6696315871380473892'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/what-is-chrome-url.html' title='What is Chrome URL ?'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-3980136387658401547</id><published>2006-12-12T08:44:00.000-08:00</published><updated>2006-12-12T13:08:08.384-08:00</updated><title type='text'>Why should I  upgrade to windows Vista</title><content type='html'>Last week i bought laptop with all latest configuration. Due to vistas late release i have to satisfy with XP professional SP2.  AS far I know XP with SP2 provides lot of security than the latest Vista as it has already been tested for long years. Suppose if i need to upgrade to vista.. My printer will not work... may be some installations will not work.&lt;br /&gt;&lt;br /&gt;The only reason looking for Vista is Aero glassy features and security. It requires  high quality PC components.&lt;br /&gt;&lt;p class="P1"&gt;According to Itwire ,Many  know that the software cost of upgrading from Windows XP  to Windows Vista Business is US$199 but they might not know that the Vista  upgrade carries a hardware cost as well, with about US$100 in new or additional  PC components required to make the jump to Microsoft's newest operating system,  according to research firm&lt;span style="font-weight: bold;"&gt; iSuppli.&lt;/span&gt;&lt;/p&gt;&lt;p class="P1"&gt; However, Vista allows users the option of disabling the 3D interface,  eliminating the need for a new graphics card or a more powerful integrated  graphics chip. Whether or not to pay the additional costs required to obtain the  3D functionality is a choice that individual users or companies must make.&lt;/p&gt;why  a business user, small or large,  have to upgrade to Vista just becuase Windows  XP has finally matured? We can't think of a single reason other than the fact is  that from January 30, 2007, Microsoft will stop selling Windows XP and  eventually we'll be forced to move to Vista - or something else. They wanna capture the market by forcing the users or businesses to get vista&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tkqlhce.com/click-2235427-10362038"&gt;&lt;br /&gt;&lt;img src="http://www.lduhtrp.net/image-2235427-10362038" width="468" height="60" alt="7-day Free trial of Napster!" border="0"/&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-3980136387658401547?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/3980136387658401547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=3980136387658401547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3980136387658401547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3980136387658401547'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/why-i-should-upgrade-to-windows-vista.html' title='Why should I  upgrade to windows Vista'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-4475042463961705023</id><published>2006-12-08T07:55:00.000-08:00</published><updated>2006-12-13T12:09:56.809-08:00</updated><title type='text'>What is XUL and Its role in Mozilla/Firefox browser</title><content type='html'>&lt;span style="font-weight: bold;"&gt;What is XUL and why was it created?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;XUL is developed to make firefox/mozilla browser easily and faster.&lt;br /&gt;It follows XML structure and schemantics.&lt;br /&gt;Even MathML or SVG can be inserted within it.&lt;br /&gt;&lt;br /&gt;WE can make the following elements:&lt;br /&gt;*  Input controls such as textboxes and checkboxes&lt;br /&gt;* Toolbars with buttons or other content&lt;br /&gt;* Menus on a menu bar or pop up menus&lt;br /&gt;* Tabbed dialogs&lt;br /&gt;* Trees for hierarchical or tabular information&lt;br /&gt;* Keyboard shortcuts&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;The created applications can be used as : &lt;/span&gt;&lt;br /&gt;Firefox extension&lt;br /&gt;Standalone XULRunner application&lt;br /&gt;XUL package&lt;br /&gt;Remote XUL application&lt;br /&gt;&lt;br /&gt;Before learning XUL u need to know the following:&lt;br /&gt;XML(DOM),&lt;br /&gt;HTML,&lt;br /&gt;CSS,&lt;br /&gt;JavaScript and latest firefox browser&lt;br /&gt;&lt;br /&gt;You can use same CSS properties in XUL just like HTML CSS.&lt;br /&gt;&lt;br /&gt;THe XUL can be accessed from Browser using Chrome  URL.&lt;br /&gt;'chrome://' Your URL -&gt; refers installed packages and extensions.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;if you are going to use XUL on a web site, you can just put the XUL file on the web site as you would an HTML file, and then load its URL in a browser. Ensure that your web server is configured to send XUL files with the content type of 'application/vnd.mozilla.xul+xml'. This content type is how Mozilla knows the difference between HTML and XUL.&lt;br /&gt;&lt;br /&gt;Mozilla does not use the file extension, unless reading files from the file system, but you should use the .xul extension for all XUL files. You can load XUL files from your own machine by opening them in the browser, or by double-clicking the file in your file manager. Remember that remote XUL will have significant restrictions on what it can do.&lt;br /&gt;&lt;br /&gt;Firefox uses different documents types for :HTML, XML and XUL&lt;br /&gt;Naturally, the HTML document is used for HTML documents, the XUL document is used for XUL documents, and the XML document is used for other types of XML documents. Since XUL is also XML, the XUL document is a subtype of the more generic XML document.&lt;br /&gt;&lt;br /&gt;To summarize the points made above:&lt;br /&gt;&lt;br /&gt;* Mozilla renders both HTML and XUL using the same underlying engine and uses CSS to specify their presentation.&lt;br /&gt;* XUL may be loaded from a remote site, the local file system, or installed as a package and accessed using a chrome URL. This is what browser extensions do.&lt;br /&gt;* Chrome URLs may be used to access installed packages and open them with enhanced privileges.&lt;br /&gt;* HTML, XML and XUL each have a different document type. Some features may be used in any document type whereas some features are specific to one kind of document.&lt;br /&gt;&lt;br /&gt;Example of buttons:&lt;br /&gt;&lt;pre&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;?xml-stylesheet href="chrome://global/skin/" type="text/css"?&amp;gt;&lt;br /&gt;&amp;lt;window&lt;br /&gt;    id="findfile-window"&lt;br /&gt;    title="Find Files"&lt;br /&gt;    orient="horizontal"&lt;br /&gt;    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"&amp;gt;&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;  &amp;lt;button id="find-button" label="Find"/&amp;gt;&lt;br /&gt;  &amp;lt;button id="cancel-button" label="Cancel"/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/window&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-4475042463961705023?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/4475042463961705023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=4475042463961705023' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4475042463961705023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/4475042463961705023'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/what-is-xul-and-its-role-inf.html' title='What is XUL and Its role in Mozilla/Firefox browser'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-7507177814453787717</id><published>2006-12-04T10:33:00.001-08:00</published><updated>2006-12-04T10:58:54.765-08:00</updated><title type='text'>Tech-Online Videos</title><content type='html'>&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=2fd9af2f-69df-42b3-9fa9-fd1ac96db963" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=2fd9af2f-69df-42b3-9fa9-fd1ac96db963" target="_new" title="Favourites Center in IE7"&gt;Video: Favourites Center in IE7&lt;/a&gt;&lt;br /&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=b5fa2641-44a7-448d-994a-2db46dee3504" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=b5fa2641-44a7-448d-994a-2db46dee3504" target="_new" title="RSS Feeds"&gt;Video: RSS Feeds&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=a9dd628b-1c27-475b-9485-8c56856a203a" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=a9dd628b-1c27-475b-9485-8c56856a203a" target="_new" title="ASP.NET und RSS feeds"&gt;Video: ASP.NET und RSS feeds&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=663ab37e-677d-44ff-b0b7-450ac2315320" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=663ab37e-677d-44ff-b0b7-450ac2315320" target="_new" title="Vista Aurora Desktop?"&gt;Video: Vista Aurora Desktop?&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=8431cd5c-5ec3-4b1a-9d9b-245ff4158394" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=8431cd5c-5ec3-4b1a-9d9b-245ff4158394" target="_new" title="Microsoft Zune"&gt;Video: Microsoft Zune&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=c6636690-c674-4550-bda1-c42f064df538" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=c6636690-c674-4550-bda1-c42f064df538" target="_new" title="Microsoft Home"&gt;Video: Microsoft Home&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=f17849a6-7ebc-41e2-8997-21138a2f949c" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=f17849a6-7ebc-41e2-8997-21138a2f949c" target="_new" title="Vista, wallpaper"&gt;Video: Vista, wallpaper&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=10b51e28-880e-48fb-a89d-2a12ac314e7a" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=10b51e28-880e-48fb-a89d-2a12ac314e7a" target="_new" title="Xp and Vista"&gt;Video: Xp and Vista&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=b5154fa8-1c18-487b-b848-1cb85b18b960" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=b5154fa8-1c18-487b-b848-1cb85b18b960" target="_new" title="Bill Gates on Open Source"&gt;Video: Bill Gates on Open Source&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=b6cfa8a5-831c-4aad-8d19-261cffbdde87" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=b6cfa8a5-831c-4aad-8d19-261cffbdde87" target="_new" title="View on Vista - Windows Meeting Space"&gt;Video: View on Vista - Windows Meeting Space&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=b17a4550-f1c1-4d73-8d06-e44ca488713e" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=b17a4550-f1c1-4d73-8d06-e44ca488713e" target="_new" title="Views On Vista - Reliability Monitor"&gt;Video: Views On Vista - Reliability Monitor&lt;/a&gt;&lt;br /&gt;&lt;br&gt;&lt;embed src="http://soapbox.msn.com/flash/soapbox1_1.swf" quality="high" width="412" height="362" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;v=2a205c4d-79da-4d6e-9d54-abef92977c23" &gt;&lt;/embed&gt;&lt;br /&gt;&lt;a href="http://soapbox.msn.com/video.aspx?vid=2a205c4d-79da-4d6e-9d54-abef92977c23" target="_new" title="Desktop Search in Windows Vista"&gt;Video: Desktop Search in Windows Vista&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-7507177814453787717?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/7507177814453787717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=7507177814453787717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7507177814453787717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/7507177814453787717'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/favourites-center-in-ie7.html' title='Tech-Online Videos'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-5955400577574615885</id><published>2006-12-01T13:55:00.000-08:00</published><updated>2006-12-01T13:56:38.654-08:00</updated><title type='text'>Ruby books :</title><content type='html'>Programming Ruby: A Pragmatic Guide2nd edition.&lt;br /&gt;&lt;br /&gt;Making Use of Ruby by Suresh MahadevanWiley; ISBN 0-471-21972-X (2002)&lt;br /&gt;&lt;br /&gt;Teach Yourself Ruby in 21 Daysby Mark SlagellSams; ISBN: 0672322528 (March, 2002)&lt;br /&gt;&lt;br /&gt;Ruby Developer's Guideby Michael Neumann, Robert Feldt, Lyle JohnsonPublishers Group West; ISBN: 1928994644 (February, 2002)&lt;br /&gt;&lt;br /&gt;The Ruby Wayby Hal FultonSams; ISBN: 0672320835 (December, 2001)&lt;br /&gt;&lt;br /&gt;Ruby In A Nutshellby Yukihiro MatsumotoO'Reilly &amp; Associates; ISBN: 0596002149 (November, 2001)&lt;br /&gt;&lt;br /&gt;Programming Ruby: A Pragmatic Guideby Dave Thomas and Andrew HuntAddison Wesley; ISBN: 0201710897 (2000)(As of Sept 2004, there is a second edition. It is not open- sourced at this time.) &lt;a href="http://www.rubycentral.com/book/"&gt;Online version&lt;/a&gt;(Note that this is a legal first edition.)&lt;br /&gt;&lt;a href="http://www.pragmaticprogrammer.com/downloads/book.html"&gt;Download&lt;/a&gt; &lt;a href="http://www.pragmaticprogrammer.com/ruby/errata/errata.html"&gt;Errata&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-5955400577574615885?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/5955400577574615885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=5955400577574615885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5955400577574615885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/5955400577574615885'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/ruby-books.html' title='Ruby books :'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-6001773250600848647</id><published>2006-12-01T13:52:00.000-08:00</published><updated>2006-12-01T13:53:50.735-08:00</updated><title type='text'>What is Ruby?</title><content type='html'>&lt;strong&gt;What is Ruby?&lt;/strong&gt;&lt;br /&gt;Ruby is a very high level, fully OO programming language. Indeed, Ruby is one of the relatively few pure OO languages. Yet despite its conceptual simplicity, Ruby is still a powerful and practical "industrial strength" development language.&lt;br /&gt;&lt;br /&gt;Ruby selectively integrates many good ideas taken from Perl, Python, Smalltalk, Eiffel, ADA, CLU, and LISP. Ruby combines these ideas in a natural, well-coordinated system that embodies the principles of least effort and least surprise to a substantially greater extent than most comparable languages — i.e., you get more bang for your buck, and what you write is more likely to give you what you expected to get. Ruby is thus a relatively easy to learn, easy to read, and easy to maintain language; yet it is very powerful and sophisticated.&lt;br /&gt;&lt;br /&gt;In addition to common OO features, Ruby also has threads, singleton methods, mixins, fully integrated closures and iterators, plus proper meta-classes. Ruby has a true mark-and-sweep garbage collector, which makes code more reliable and simplifies writing extensions. In summary, Ruby provides a very powerful and very easy to deploy "standing on the shoulders of giants" OO scaffolding/framework so that you can more quickly and easily build what you want to build, to do what you want to do.&lt;br /&gt;&lt;br /&gt;You will find many former (and current) Perl, Python, Java, and C++ users on comp.lang.ruby that can help you get up to speed in Ruby.&lt;br /&gt;&lt;br /&gt;Finally, Ruby is an "open source" development programming language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-6001773250600848647?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/6001773250600848647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=6001773250600848647' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6001773250600848647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/6001773250600848647'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/12/what-is-ruby.html' title='What is Ruby?'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-2074931866977637142</id><published>2006-11-30T11:05:00.000-08:00</published><updated>2006-11-30T11:11:54.697-08:00</updated><title type='text'>XAML vs XUL vs MXML Comparision</title><content type='html'>&lt;strong&gt;MXML &lt;/strong&gt;&lt;br /&gt;Runs anywhere Flash Player 7&lt;br /&gt;Server required&lt;br /&gt;Uses ActionScript 2.0&lt;br /&gt;XPath support: no&lt;br /&gt;CSS support: limited&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;XAML  &lt;/strong&gt;&lt;br /&gt;runs Runs only on Longhorn&lt;br /&gt;Server not required&lt;br /&gt; Uses .NET languages&lt;br /&gt; XPath support: yes&lt;br /&gt;  CSS support: no&lt;br /&gt;&lt;br /&gt;XUL&lt;br /&gt;Runs on any platform.&lt;br /&gt;Server Not Required&lt;br /&gt;Javascript, Python, C++&lt;br /&gt;XPath support: yes&lt;br /&gt;CSS Support: excellent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-2074931866977637142?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/2074931866977637142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=2074931866977637142' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2074931866977637142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/2074931866977637142'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/11/xaml-vs-xul-vs-mxml-comparision.html' title='XAML vs XUL vs MXML Comparision'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-8148762250179318020</id><published>2006-11-29T07:49:00.000-08:00</published><updated>2006-12-12T13:08:53.223-08:00</updated><title type='text'>Ajax Stories</title><content type='html'>&lt;strong&gt;ASP.NET AJAX under the hood secrets&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;By &lt;a href="http://www.codeproject.com/script/Articles/list_articles.asp?userid=138289"&gt;Omar Al Zabir&lt;/a&gt;.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Take look at this site &lt;a href="http://www.codeproject.com/Ajax/aspnetajaxtips.asp"&gt;aspnetajaxtips&lt;/a&gt;   .You will find  advantages and disadvantages of Batch calls, AJAX call timeouts, browser call jam problem, ASP.NET 2.0's bug in &lt;a class="iAs" style="FONT-WEIGHT: normal; FONT-SIZE: 100%; PADDING-BOTTOM: 1px; COLOR: darkgreen; BORDER-BOTTOM: darkgreen 0.07em solid; BACKGROUND-COLOR: transparent; TEXT-DECORATION: underline" href="http://www.codeproject.com/Ajax/aspnetajaxtips.asp#" target="_blank" itxtdid="2809133"&gt;web service&lt;/a&gt; response caching, and so on.  This guy (&lt;a href="http://www.codeproject.com/script/Articles/list_articles.asp?userid=138289"&gt;Omar Al Zabir&lt;/a&gt;) has created  &lt;a href="http://www.pageflakes.com/" target="_blank"&gt;Pageflakes&lt;/a&gt; website. He is MVP professional. I recommend every Asp.Net professional look at his work and samples.&lt;br /&gt;He gives answer to this question  "Why did not you use Protopage or Dojo library?"&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AJAX Demos&lt;/strong&gt;&lt;br /&gt;&lt;a title="Basic AJAX Examples" href="http://www.clearnova.com/ajax/"&gt;Basic AJAX Examples&lt;/a&gt; The downloadable samples include full JavaScript &amp; Java Source, a sample database for any SQL database, and a PowerPoint presentation. This sampler shows some basic techniques to demonstrate some of the possibilities of using AJAX/XMLHTTPRequest techniques in web applications. Basic browser &amp;amp; server interaction is demonstrated along with dynamic population of visual elements such as DIVs and SELECT drop downs.In addition, many ways of instantiating &amp; encapsulating XMLHTTPRequest objects are shown in the Javascript.&lt;br /&gt;--&gt;&lt;a title="Drag &amp;amp; Drop Sortable Lists with JavaScript and CSS" href="http://tool-man.org/examples/sorting.html"&gt;Drag &amp; Drop Sortable Lists with JavaScript and CSS&lt;/a&gt; In Web applications I've seen numerous, and personally implemented a few, ways to rearrange items in a list. All of those were indirect interactions typically involving something like up/down arrows next to each item. The most heinous require server roundtrips for each modification...boo.&lt;br /&gt;--&gt;&lt;a title="FireBug" href="http://www.joehewitt.com/software/firebug/"&gt;FireBug&lt;/a&gt; FireBug is a new tool for Firefox that aids with debugging Javascript, DHTML, and Ajax. It is like a combination of the Javascript Console, DOM Inspector, and a command line Javascript interpreter.&lt;br /&gt;--&gt;&lt;a title="AjaxAnywhere" href="http://ajaxanywhere.sourceforge.net/"&gt;AjaxAnywhere&lt;/a&gt; Ajax JSP Components.&lt;br /&gt;--&gt;&lt;a title="fileNice" href="http://filenice.com/"&gt;fileNice&lt;/a&gt; PHP and AJAX file browser.&lt;br /&gt;--&gt;&lt;a title="AJAX Instant Edit Example" href="http://www.ideasfreelance.com/lab/instant_edit/"&gt;AJAX Instant Edit Example&lt;/a&gt; In spanish.&lt;br /&gt;--&gt;&lt;br /&gt;&lt;strong&gt;AJAX Drag and Drop&lt;/strong&gt;&lt;br /&gt;&lt;a title="Dragable RSS boxes" href="http://www.dhtmlgoodies.com/index.html?showDownload=true&amp;amp;whichScript=dragable-boxes"&gt;Dragable RSS boxes&lt;/a&gt; This is is a script that uses Ajax to read data from external RSS sources and display them inside dragable boxes. You can also create new boxes dynamically directly from the page.&lt;br /&gt;&lt;br /&gt;--&gt;&lt;a title="Fun with Drag and Drop with RICO" href="http://www.wideopenwest.com/~neflar/blog/2005/12/fun-with-drag-and-drop-wrico.html"&gt;Fun with Drag and Drop with RICO&lt;/a&gt; For those of you who haven't seen Rico its another AJAX library, with quite a few cool extras. What I'm going to cover here is my first expiriment with Rico and their 'drag and drop' functionality. Getting basic drag and drop functionality is extremely easy with this library, and with just a bit of modification you can easily make it fit whatever you could want.&lt;br /&gt;--&gt;&lt;br /&gt;&lt;strong&gt;AJAX Email&lt;/strong&gt;&lt;br /&gt;&lt;a title="Take AJAX to Your Email Inbox: Developing a Web-based POP 3 Client" href="http://www.devarticles.com/c/a/XML/Take-AJAX-to-Your-Email-Inbox-Developing-a-Webbased-POP-3-Client/"&gt;Take AJAX to Your Email Inbox: Developing a Web-based POP 3 Client&lt;/a&gt; In this article, the first of three parts, you will start creating a simple web-based POP 3 client using AJAX, which will use "XMLHttpRequest" objects to retrieve messages from a mail server.&lt;br /&gt;&lt;br /&gt;--&gt;&lt;a title="Ajax Workshop 1: Ajax Basics &amp; Building a Simple Email Verification With Prototype.js" href="http://www.ajaxlessons.com/2006/02/11/ajax-workshop-1-ajax-basics-build-a-simple-email-verification-with-prototypejs/"&gt;Ajax Workshop 1: Ajax Basics &amp;amp; Building a Simple Email Verification With Prototype.js&lt;/a&gt;&lt;br /&gt;In this introduction we will build a simple form (I know it says not to use AJAX for simple forms, but it is an easy example) that submits a user's information to the database and confirms if the user's email address is already in the database. We will be using a common JavaScript library by the name of prototype.js.&lt;br /&gt;--&gt;&lt;a title="Zimbra" href="http://www.zimbra.com/"&gt;Zimbra&lt;/a&gt;&lt;br /&gt;Open source AJAX email program&lt;br /&gt;--&gt;&lt;br /&gt;&lt;strong&gt;AJAX File Uploaders&lt;/strong&gt;&lt;br /&gt;&lt;a title="CakeTimer - Demo Page  An Ajax file uploads progress bar" href="http://thinkingphp.org/demos/cake-timer/"&gt;CakeTimer - Demo Page An Ajax file uploads progress bar&lt;/a&gt; This is a demonstration of an AJAX powered progressbar to monitor file uploads with (Cake)PHP. Yes you've heard right! Well, but before you begin to drool all over the place, there is one downside: it requires a Perl script that allows you to know the upload progress. But besides this little downer you have a maximum of flexibility regarding the design of your progress-bar and integration in your system.&lt;br /&gt;--&gt;&lt;br /&gt;&lt;strong&gt;AJAX Flash&lt;/strong&gt;&lt;br /&gt;&lt;a title="Incito - Interactive Everything" href="http://incito.lt/index.php#/gateways/go.php?to=products/swfjax"&gt;Incito - Interactive Everything&lt;/a&gt; SwfJax is a new approach to asynchronous JavaScript and XML applications using revolutionary Flash technology. SwfJax uses a lightweight SWF (Adobe's Small Web Format or simply - Flash) engine to get XML data from the server and xPath (XML Path Language) to address a part of data it has retrieved. Data can be returned back to Javascript as an Array. You can also send multiple xPath queries at once.&lt;br /&gt;--&gt;&lt;a title="AFLAX: The AJAX Library for the Adobe Flash Platform" href="http://www.aflax.org/"&gt;AFLAX: The AJAX Library for the Adobe Flash Platform&lt;/a&gt; Mar 15, 06 AFLAX (Wikipedia Entry) stands for Asynchronous Flash and XML. Defined simply, AFLAX is a development methodology which combines Ajax and Flash to create more dynamic web based applications. Developed by Paul Colton, the AFLAX technology is available as a library that enables developers to use JavaScript to fully utilize all of the features of Adobe's Flash runtime -- including graphics, networking, video and camera support.&lt;br /&gt;--&gt;&lt;br /&gt;&lt;strong&gt;AJAX Forms&lt;/strong&gt;&lt;br /&gt;&lt;a title="HTTP Authentication with HTML Forms" href="http://www.peej.co.uk/articles/http-auth-with-html-forms.html"&gt;HTTP Authentication with HTML Forms&lt;/a&gt; Authentication in Web applications has been highjacked, HTTP defines a standard way of providing authentication but most apps use the evil spawn of Netscape, otherwise known as cookies. Why is this? Cookies aren't designed for authentication, they're a pain to use for it, insecure unless you know what you're doing, non-standard, and unRESTful.&lt;br /&gt;--&gt;&lt;a title="FormSpring" href="http://www.formspring.com/"&gt;FormSpring&lt;/a&gt; Online AJAX powered from builder.&lt;br /&gt;--&gt;&lt;a title="Niceforms" href="http://www.badboy.ro/articles/2005-07-23/index.php"&gt;Niceforms&lt;/a&gt; Web forms. Everybody knows web forms. Each day we have to fill in some information in a web form, be it a simple login to your webmail application, an online purchase or signing up for a website. They are the basic (and pretty much the only) way of gathering information on the web.&lt;br /&gt;--&gt;&lt;a title="Capxous - AutoAssist" href="http://capxous.com/autoassist/"&gt;Capxous - AutoAssist&lt;/a&gt; AutoAssist is an auto completion web widget that written in pure JavaScript. It can help enhance the accessibility of existing website, let the users to work effective and feel comfortable. Moreover, it just a pure JavaScript file that won't break existing code or development style. (Related post: http://capxous.com/autoassist/)&lt;br /&gt;--&gt;&lt;a title="Cake Baker - Submit a Form With AJAX" href="http://cakebaker.wordpress.com/2006/01/18/submit-a-form-with-ajax/"&gt;Cake Baker - Submit a Form With AJAX&lt;/a&gt; The new release of CakePHP (RC2) comes with a completely rewritten AjaxHelper::form() function (with the disadvantage that it breaks existing code).&lt;br /&gt;--&gt;&lt;a title="Wufoo - AJAX Form Builder" href="http://wufoo.com/"&gt;Wufoo - AJAX Form Builder&lt;/a&gt;Wufoo is a web-based tool to help you build and host amazing online forms. In only a few short minutes, you can create a mailing list, a marketing survey or even a complete customer management system.&lt;br /&gt;--&gt;&lt;a title="Accessible Forms and Unobtrusive Javascript - dotvoid.com" href="http://www.dotvoid.com/view.php?id=56"&gt;Accessible Forms and Unobtrusive Javascript - dotvoid.com&lt;/a&gt; I usually try to separate backend logic from the user interface logic when creating new PHP applications. I am pro fat gui and usually have a lot of client side scripting going on. I mostly use AJAX or other remote scripting techniques to call actions defined in the PHP backend.&lt;br /&gt;--&gt;&lt;a title="jotForm" href="http://www.jotform.com/"&gt;jotForm&lt;/a&gt; jotForm is the first web based WYSIWYG form builder.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tkqlhce.com/click-2235427-10362038"&gt;&lt;br /&gt;&lt;img src="http://www.lduhtrp.net/image-2235427-10362038" width="468" height="60" alt="7-day Free trial of Napster!" border="0"/&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-8148762250179318020?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/8148762250179318020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=8148762250179318020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8148762250179318020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/8148762250179318020'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/11/ajax-stories.html' title='Ajax Stories'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-22558669249280938</id><published>2006-11-28T14:00:00.001-08:00</published><updated>2006-12-01T13:51:37.928-08:00</updated><title type='text'>Latest news on karimnagar byelection</title><content type='html'>For more recent news features related to this topic, please click on a link to the left.&lt;br /&gt;&lt;a href="http://www.andhrajyothy.com/mainshow.asp?qry=/2006/nov/30main27"&gt;Skull struggle&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.andhrajyothy.com/mainshow.asp?qry=/2006/dec/1main25"&gt;Bill by BJp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.andhrajyothy.com/mainshow.asp?qry=/2006/dec/1main28"&gt;Telangana in 2009&lt;/a&gt; by Venkat Swamy&lt;br /&gt;&lt;a href="http://www.andhrajyothy.com/mainshow.asp?qry=/2006/dec/1main6"&gt;bedi workers strike&lt;br /&gt;&lt;/a&gt;bedi workers strike&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/November/21-Bypoll-campaign-intensifies.asp"&gt;Bypoll campaign intensifies&lt;/a&gt;Dattatreya and Digvijay Singh to tour Karimnagar&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/November/17-TRS-chief-files-nomination.asp"&gt;TRS chief files nomination&lt;/a&gt;Kick starts election campaign&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/November/16-TDP-candidates-file-elections.asp"&gt;TDP candidates file nominations for by-elections&lt;/a&gt;L. Ramana to stand in Karimnagar&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/November/7-By-polls-Karimnagar-Bobbili-2006.asp"&gt;By polls for Karimnagar and Bobbili on December 4, 2006&lt;/a&gt;Congress, TDP, BJP and TRS have already announced their candidates&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/November/1-Karimnagar-by-poll.asp"&gt;Karimnagar by poll&lt;/a&gt;L. Ramana picked as TDP candidate&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/October/29-BJP-plans-yatra-Karimnagar.asp"&gt;BJP plans yatra in Karimnagar&lt;/a&gt;Aims at exposing hollows of other parties&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/October/26-T-Jeevan-Reddy-Congress-poll.asp"&gt;T Jeevan Reddy for Congress nominee for Karimnagar by poll&lt;/a&gt;Congress Party makes surprise move&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/October/22-TRS-TDP-men-join-Congress-Party.asp"&gt;TRS TDP men join Congress Party&lt;/a&gt;Congress party gains strength amidst Karimnagar by-election&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/October/10-APCC-draft-Ministers-MLAs-Karimnagar-election.asp"&gt;APCC to draft the services of Ministers and MLAs for Karimnagar election&lt;/a&gt;Congress party presses top core team for elections&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/October/10-Rebel-TRS-MLA-vote-Congress-BJP.asp"&gt;Rebel TRS MLA Mandadi asks voters to vote for Congress or BJP&lt;/a&gt;Says party lacks internal democracy&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/October/4-KCR-TRS-Karimnagar-seat.asp"&gt;KCR named TRS candidate for Karimnagar seat&lt;/a&gt;TRS calls party members to teach Congress and TDP a lesson&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.andhranews.net/state/2006/September/24-Ch-Vidyasagar-BJP-Karimnagar-poll.asp"&gt;Ch Vidyasagar Rao is BJP candidate for Karimnagar by poll&lt;/a&gt;State unit proposes his name unanimously&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-22558669249280938?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/22558669249280938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=22558669249280938' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/22558669249280938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/22558669249280938'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/11/latest-news-on-karimnagar-byelection.html' title='Latest news on karimnagar byelection'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-360436152455172110.post-3848159686884534289</id><published>2006-11-28T13:50:00.000-08:00</published><updated>2006-11-28T13:53:57.741-08:00</updated><title type='text'>Karimnagar byelection</title><content type='html'>Professors fan out in the constituency and visit interior villages&lt;br /&gt;&lt;br /&gt;KARIMNAGAR: TRS president K. Chandrasekhar Rao has found a new set of campaigners in the teaching faculty of Osmania and Kakatiya Universities and Non-Resident Indians, who have rallied behind him in the run-up to the Karimnagar byelection.&lt;br /&gt;&lt;br /&gt;Led by the former dean of social sciences, Osmania University, Madhusudhan Reddy and K. Laxman of Philosophy Department, the teachers are fanning out in the Karimnagar parliamentary constituency visiting interior villages and seeking votes for the TRS chief and urging them to uphold the `self-esteem of Telangana'.&lt;br /&gt;&lt;br /&gt;A 30-member team of professors has divided itself into small groups to cover all the seven Assembly segments. More than 300 students from OU are going round villages educating the voters on the need for the creation of a separate State.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/360436152455172110-3848159686884534289?l=reddyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://reddyonrails.blogspot.com/feeds/3848159686884534289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=360436152455172110&amp;postID=3848159686884534289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3848159686884534289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/360436152455172110/posts/default/3848159686884534289'/><link rel='alternate' type='text/html' href='http://reddyonrails.blogspot.com/2006/11/karimngar-by-election.html' title='Karimnagar byelection'/><author><name>Jagan Reddy</name><uri>http://www.blogger.com/profile/17987992266620378604</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
