<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Riding Rails</title>
	<atom:link href="http://syampal.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://syampal.wordpress.com</link>
	<description>Just another Rails weblog</description>
	<lastBuildDate>Thu, 03 Apr 2008 02:16:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='syampal.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Riding Rails</title>
		<link>http://syampal.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://syampal.wordpress.com/osd.xml" title="Riding Rails" />
	<atom:link rel='hub' href='http://syampal.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Getting TinyMCE 3.0 Spellchecker to work with Rails</title>
		<link>http://syampal.wordpress.com/2008/02/26/getting-tinymce-30-spellchecker-to-work-with-rails/</link>
		<comments>http://syampal.wordpress.com/2008/02/26/getting-tinymce-30-spellchecker-to-work-with-rails/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 10:30:37 +0000</pubDate>
		<dc:creator>syampal</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[ROR]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://syampal.wordpress.com/?p=10</guid>
		<description><![CDATA[In new version of TinyMCE editor there are many changes in plug ins. The Plug in code is changed. The popular spell checker plug in now uses JSON as transport mechanism instead of XML. In my example we are using Aspell to check spellings, so you must have Aspell installed on your system for this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=10&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In new version of <a href="http://tinymce.moxiecode.com/">TinyMCE</a> editor there are many changes in plug ins. The Plug in code is changed. The popular <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker">spell checker plug in</a> now uses JSON as transport mechanism instead of XML. In my example we are using Aspell to check spellings, so you must have Aspell installed on your system for this example to work</p>
<p>Issue this command on CLI to check if Aspell is installed:</p>
<blockquote><p>% aspell</p></blockquote>
<p>You should see help output related to command</p>
<p>First of all you need to install JSON gem to parse JSON requests</p>
<blockquote><p>% sudo gem install json</p></blockquote>
<p>Then write this action in a controller:</p>
<blockquote><p>require json</p>
<p>def spellcheck<br />
raw = request.env['RAW_POST_DATA']<br />
req = JSON.parse(raw)<br />
lang = req["params"][0]<br />
if req["method"] == &#8216;checkWords&#8217;<br />
text_to_check = req["params"][1].join(&#8221; &#8220;)<br />
else<br />
text_to_check = req["params"][1]<br />
end<br />
suggestions = check_spelling_new(text_to_check, req["method"], lang)<br />
render :json =&gt; {&#8220;id&#8221; =&gt; nil, &#8220;result&#8221; =&gt; suggestions, &#8220;error&#8221; =&gt; nil}.to_json<br />
return<br />
end</p></blockquote>
<p>Now also write this method in private section of controller:</p>
<blockquote><p>def check_spelling_new(spell_check_text, command, lang)<br />
json_response_values = Array.new<br />
spell_check_response = `echo &#8220;#{spell_check_text}&#8221; | aspell -a -l #{lang}`<br />
if (spell_check_response != &#8221;)<br />
spelling_errors = spell_check_response.split(&#8216; &#8216;).slice(1..-1)<br />
if (command == &#8216;checkWords&#8217;)<br />
i = 0<br />
while i &lt; spelling_errors.length<br />
spelling_errors[i].strip!<br />
if (spelling_errors[i].to_s.index(&#8216;&amp;&#8217;) == 0)<br />
match_data = spelling_errors[i + 1]<br />
json_response_values &lt;&lt; match_data<br />
end<br />
i += 1<br />
end<br />
elsif (command == &#8216;getSuggestions&#8217;)<br />
arr = spell_check_response.split(&#8216;:&#8217;)<br />
suggestion_string = arr[1]<br />
suggestions = suggestion_string.split(&#8216;,&#8217;)<br />
for suggestion in suggestions<br />
suggestion.strip!<br />
json_response_values &lt;&lt; suggestion<br />
end<br />
end<br />
end<br />
return json_response_values<br />
end</p></blockquote>
<p>now you need to open /plugins/spellchecker/editor_plugin.js file under your Tiny MCE directory. Search for this line;</p>
<blockquote><p>t.url = url;</p></blockquote>
<p>and change it to:</p>
<blockquote><p>t.url = &#8216;http://www.yourhostname.com&#8217;;</p></blockquote>
<p>then search for this line:</p>
<blockquote><p>var t = this, url = t.editor.getParam(&#8220;spellchecker_rpc_url&#8221;, this.url+&#8217;/rpc.php&#8217;);</p></blockquote>
<p>and change it to:</p>
<blockquote><p>var t = this, url = t.editor.getParam(&#8220;spellchecker_rpc_url&#8221;, this.url+&#8217;/spellcheck&#8217;);</p></blockquote>
<p>and to make this work just add this route to routes.rb under config folder</p>
<blockquote><p>map.connect &#8216;/spellcheck&#8217;, :controller =&gt; &#8216;your_controller_name&#8217;, :action =&gt; &#8216;spellcheck&#8217;<br />
#replace your_controller_name with name of our controller in which the spellcheck action is written</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syampal.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syampal.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syampal.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syampal.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syampal.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syampal.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syampal.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syampal.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syampal.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syampal.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syampal.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syampal.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syampal.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syampal.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syampal.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syampal.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=10&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syampal.wordpress.com/2008/02/26/getting-tinymce-30-spellchecker-to-work-with-rails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/976420f4d88900731a768793d7c42986?s=96&#38;d=identicon" medium="image">
			<media:title type="html">syampal</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails plugin symlinked broken on 1.2.5, fixed from 2.0</title>
		<link>http://syampal.wordpress.com/2007/11/24/rails-plugin-symlinked-broken-on-125-fixed-from-20/</link>
		<comments>http://syampal.wordpress.com/2007/11/24/rails-plugin-symlinked-broken-on-125-fixed-from-20/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 18:27:59 +0000</pubDate>
		<dc:creator>syampal</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[ROR]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://syampal.wordpress.com/2007/11/24/rails-plugin-symlinked-broken-on-125-fixed-from-20/</guid>
		<description><![CDATA[I was trying to build a rails plugin. my project was in different directory so i symlinked the directory under “vendor/plugins/..”. but i couldn’t find it working. so after passing few times, i could successfully run my plugin under rails 2.0-RC2. so later i compared lookup.rb file from the 1.5 and 2.0-RC2 release. the defecting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=3&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was trying to build a rails plugin. my project was in different directory so i symlinked the directory under “vendor/plugins/..”. but i couldn’t find it working.</p>
<p>so after passing few times, i could successfully run my plugin under rails 2.0-RC2. so later i compared lookup.rb file from the 1.5 and 2.0-RC2 release.</p>
<p>the defecting code was the following lines &#8211; (1.5)</p>
<blockquote><p>def use_component_sources!<br />
# ….<br />
sources &lt; &lt; PathSource.new(:lib, &#8220;#{::RAILS_ROOT}/lib/generators&#8221;)<br />
sources &lt;&lt; PathSource.new(:vendor, &#8220;#{::RAILS_ROOT}/vendor/generators&#8221;)<br />
sources &lt;&lt; PathSource.new(:plugins, &#8220;#{::RAILS_ROOT}/vendor/plugins/**/generators&#8221;)<br />
# &#8230;.<br />
end</p></blockquote>
<p>the fixed version &#8211; (2.0-RC2)</p>
<blockquote><p>def use_component_sources!<br />
# …</p>
<p>sources &lt; &lt; PathSource.new(:lib, &#8220;#{::RAILS_ROOT}/lib/generators&#8221;)<br />
sources &lt;&lt; PathSource.new(:vendor, &#8220;#{::RAILS_ROOT}/vendor/generators&#8221;)<br />
sources &lt;&lt; PathSource.new(:plugins, &#8220;#{::RAILS_ROOT}/vendor/plugins/*/**/generators&#8221;)<br />
sources &lt;&lt; PathSource.new(:plugins, &#8220;#{::RAILS_ROOT}/vendor/plugins/*/**/rails_generators&#8221;)<br />
end<br />
# &#8230;<br />
end</p></blockquote>
<p>i also checked out rails bug tracker i found <a href="http://dev.rubyonrails.org/ticket/4245">a bug was pointed</a> to this issue  and apparently which was fixed on the following change set.<br />
<a href="http://dev.rubyonrails.org/changeset/6101">http://dev.rubyonrails.org/changeset/6101</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syampal.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syampal.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syampal.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syampal.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syampal.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syampal.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syampal.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syampal.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syampal.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syampal.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syampal.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syampal.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syampal.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syampal.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syampal.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syampal.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=3&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syampal.wordpress.com/2007/11/24/rails-plugin-symlinked-broken-on-125-fixed-from-20/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/976420f4d88900731a768793d7c42986?s=96&#38;d=identicon" medium="image">
			<media:title type="html">syampal</media:title>
		</media:content>
	</item>
		<item>
		<title>Star rating in ruby on rails</title>
		<link>http://syampal.wordpress.com/2007/08/13/star-rating-in-ruby-on-rails/</link>
		<comments>http://syampal.wordpress.com/2007/08/13/star-rating-in-ruby-on-rails/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 17:24:41 +0000</pubDate>
		<dc:creator>syampal</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[ROR]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://syampal.wordpress.com/2007/09/13/star-rating-in-ruby-on-rails/</guid>
		<description><![CDATA[Recently I needed to implement star rating system for one of my project I am working on.If you are not familiar with a star rating system, its simply a method of voting using (usually) 5 stars in a row, which will change colour as you hover over them indicating the level at which to rate [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=9&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="postentry">
<div class="snap_preview"> Recently I needed to implement star rating system for one of my project I am working on.If you are not familiar with a star rating system, its simply a method of voting using (usually) 5 stars in a row, which will change colour as you hover over them indicating the level at which to rate something. You may think a simple rollover would accomplish this but difficulty arises because as you rollover each star it should stay highlighted while you light up the next one and so on until the end of the row of stars.</p>
<p>If this doesnt make much sense to you then take a look at what we are going to achieve in this article. (I will leave the server-side coding to someone more knowledgeable and we will just concentrate on the visual aspects of making this effect happen. )</p>
<p>As you can see from the demo the stars stay hovered as you rollover each one. However, as mentioned earlier, the complicated part is that as each star is hovered it should stay alight while the next one is hovered so that if you start at the left side then 1,2,3,4 and 5 stars will be alight as you traverse the row. Usually a rollover will only be active on the anchor that the pointer is currently over making previous anchors lose their focus and thus their hover effect disappear.</p>
<p><b>Install the acts_as_rateable plugin.</b></p>
<p>Run the following from the root of your Rails app to install the plugin.</p>
<p>script/plugin install http://juixe.com/svn/acts_as_rateable<br />
or<br />
http://rubyforge.org/projects/rateableplugin/</p>
<p><b>Create the table(migration) to store rating into database</b></p>
<p>class CreateRatings&lt; ActiveRecord::Migration</p>
<p>def self.up<br />
create_table :ratings, :force =&gt; true do |t|<br />
t.column :rating, :integer, :default =&gt; 0<br />
t.column :created_at, :datetime, :null =&gt; false<br />
t.column :rateable_type, :string, :limit =&gt; 15,<br />
:default =&gt; “”, :null =&gt; false<br />
t.column :rateable_id, :integer, :default =&gt; 0, :null =&gt; false<br />
t.column :user_id, :integer, :default =&gt; 0, :null =&gt; false<br />
end</p>
<p>add_index :ratings, [”user_id”], :name =&gt; “fk_ratings_user”<br />
end</p>
<p>def self.down<br />
drop_table :ratings<br />
end</p>
<p>end</p>
<p><b>Model</b></p>
<p>models rateable</p>
<p>I was trying to add a rating system for the model Picture. Yours can obviously be whatever you like but from here on out I’ll be using Picture. So add acts_as_rateable to your model.</p>
<p>class Picture &lt; ActiveRecord::Base<br />
acts_as_rateable<br />
…<br />
end</p>
<p><b>Controller to handle the rating</b><br />
class RatingController &lt; ApplicationController</p>
<p>def rate<br />
@picture = Picture.find(params[:id])<br />
Rating.delete_all([”rateable_type = ‘Picture’ AND rateable_id = ? AND user_id = ?”,<br />
@picture.id, current_user.id])<br />
@picture.add_rating Rating.new(:rating =&gt; params[:rating],<br />
:user_id =&gt; current_user.id)<br />
end</p>
<p>end</p>
<p><b>Views</b></p>
<p>Create the partial /views/rating/_rating.rhtml</p>
<ol class="dp-rb">
<li class="alt"><span><span>&lt;%= number_with_precision(picture.rating, 1) %&gt;/5 Stars&lt;/p&gt;  </span></span></li>
<li><span>&lt;ul <span class="keyword">class</span><span>=</span><span class="string">’star-rating’</span><span>&gt;  </span></span></li>
<li class="alt"><span>&lt;li <span class="keyword">class</span><span>=</span><span class="string">‘current-rating’</span><span> style=’width:&lt;%= (picture.rating * 30).to_i -%&gt;px;’&gt;&lt;br /&gt;  </span></span></li>
<li><span>          Currently &lt;%= number_with_precision(picture.rating, 1) %&gt;/5 Stars.  </span></li>
<li class="alt"><span>        &lt;/li&gt;  </span></li>
<li><span>&lt;li&gt;  </span></li>
<li class="alt"><span>        &lt;%= link_to_remote( <span class="string">“1″</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 1}},&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:class</span><span> =&gt; ‘one-star’, </span><span class="symbol">:name</span><span> =&gt; ‘1 star out of 5′) %&gt;  </span></span></li>
<li><span>    &lt;/li&gt;  </span></li>
<li class="alt"><span>&lt;li&gt;  </span></li>
<li><span>        &lt;%= link_to_remote( <span class="string">“2″</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 2}},&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:class</span><span> =&gt; ‘two-stars’, </span><span class="symbol">:name</span><span> =&gt; ‘2 stars out of 5′) %&gt;  </span></span></li>
<li class="alt"><span>    &lt;/li&gt;  </span></li>
<li><span>&lt;li&gt;  </span></li>
<li class="alt"><span>        &lt;%= link_to_remote( <span class="string">“3″</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 3}},&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:class</span><span> =&gt; ‘three-stars’, </span><span class="symbol">:name</span><span> =&gt; ‘3 stars out of 5′) %&gt;  </span></span></li>
<li><span>    &lt;/li&gt;  </span></li>
<li class="alt"><span>&lt;li&gt;  </span></li>
<li><span>        &lt;%= link_to_remote( <span class="string">“4″</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 4}},&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:class</span><span> =&gt; ‘four-stars’, </span><span class="symbol">:name</span><span> =&gt; ‘4 stars out of 5′) %&gt;  </span></span></li>
<li class="alt"><span>    &lt;/li&gt;  </span></li>
<li><span>&lt;li&gt;  </span></li>
<li class="alt"><span>        &lt;%= link_to_remote( <span class="string">“5″</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 5}},&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:class</span><span> =&gt; ‘five-stars’, </span><span class="symbol">:name</span><span> =&gt; ‘5 stars out of 5′) %&gt;  </span></span></li>
<li><span>    &lt;/li&gt;  </span></li>
<li class="alt"><span>&lt;/ul&gt;  </span></li>
<li><span>&lt;p&gt;<br />
</span></li>
</ol>
<p><b>A little RJS</b></p>
<p>Create the file /views/rating/rate.rjs<br />
page.replace_html “star-ratings-block”, :partial =&gt; ‘rating/rating’, :locals =&gt; { :picture=&gt; @picture }</p>
<p>This will replace the star ratings with the partial we created previously in order to reflect any rating changes made by the submission.</p>
<p>Render the partial in one of your views.<br />
“rating/rating”, :locals =&gt; { :picture =&gt; @picture } %&gt;</p>
<p>This needs @picture(or whatver you’re going to be using) in order to function.</p>
<p><b>Remember to add the css and image</b><br />
/* styles for the star rater */<br />
.star-rating{<br />
list-style:none;<br />
margin: 0;<br />
padding:0;<br />
width: 150px;<br />
height: 30px;<br />
position: relative;<br />
background: url(/images/star_rating.gif) top left repeat-x;<br />
}<br />
.star-rating li{<br />
padding:0;<br />
margin:0;<br />
float: left;<br />
}<br />
.star-rating li a{<br />
display:block;<br />
width:30px;<br />
height: 30px;<br />
text-decoration: none;<br />
text-indent: -9000px;<br />
z-index: 20;<br />
position: absolute;<br />
padding: 0px;<br />
}<br />
.star-rating li a:hover{<br />
background: url(/images/star_rating.gif) left center;<br />
z-index: 2;<br />
left: 0px;<br />
border:none;<br />
}<br />
.star-rating a.one-star{<br />
left: 0px;<br />
}<br />
.star-rating a.one-star:hover{<br />
width:30px;<br />
}<br />
.star-rating a.two-stars{<br />
left:30px;<br />
}<br />
.star-rating a.two-stars:hover{<br />
width: 60px;<br />
}<br />
.star-rating a.three-stars{<br />
left: 60px;<br />
}<br />
.star-rating a.three-stars:hover{<br />
width: 90px;<br />
}<br />
.star-rating a.four-stars{<br />
left: 90px;<br />
}<br />
.star-rating a.four-stars:hover{<br />
width: 120px;<br />
}<br />
.star-rating a.five-stars{<br />
left: 120px;<br />
}<br />
.star-rating a.five-stars:hover{<br />
width: 150px;<br />
}<br />
.star-rating li.current-rating{<br />
background: url(/images/star_rating.gif) left bottom;<br />
position: absolute;<br />
height: 30px;<br />
display: block;<br />
text-indent: -9000px;<br />
z-index: 1;<br />
}</p>
<p><b>Image for your CSS</b></p>
<p>star_rating.gif</p></div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syampal.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syampal.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syampal.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syampal.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syampal.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syampal.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syampal.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syampal.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syampal.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syampal.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syampal.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syampal.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syampal.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syampal.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syampal.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syampal.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=9&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syampal.wordpress.com/2007/08/13/star-rating-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/976420f4d88900731a768793d7c42986?s=96&#38;d=identicon" medium="image">
			<media:title type="html">syampal</media:title>
		</media:content>
	</item>
		<item>
		<title>Multiple Checkboxes with HABTM</title>
		<link>http://syampal.wordpress.com/2007/06/20/multiple-checkboxes-with-habtm/</link>
		<comments>http://syampal.wordpress.com/2007/06/20/multiple-checkboxes-with-habtm/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 16:30:05 +0000</pubDate>
		<dc:creator>syampal</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[ROR]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://syampal.wordpress.com/2007/06/20/multiple-checkboxes-with-habtm/</guid>
		<description><![CDATA[Has and Belongs to Many with Multiple Check boxes So if you are trying to do a multiple select of checkboxes and using habtm in your project, but when you submit the form, only one value was available in your controller. While you try to edit records in database but because of some error you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=6&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Has and Belongs to Many with Multiple Check boxes</p>
<p>So if you are trying to do a multiple select of checkboxes and using habtm in your project, but when you submit the form, only one value was available in your controller. While you try to edit records in database but because of some error you get back to the pre field form and you found that the checkboxes checked by you gone ,then here’s the solution</p>
<p><span style="font-weight:bold;">Model:</span></p>
<pre></pre>
<blockquote><p>   class Customer &lt; ActiveRecord::Base<br />
has_and_belongs_to_many :intrests<br />
end</p></blockquote>
<p><span style="font-weight:bold;">Controller code:</span></p>
<pre></pre>
<blockquote><p>    class CustomersController &lt; ApplicationController<br />
def create<br />
if request.post?<br />
@customer=Customer.new(params[:customer])<br />
@customer.save<br />
end<br />
end</p>
<p>def edit<br />
@customer=Customer.find_by_id(params[:id]) if params[:id]<br />
if @customer<br />
if request.post?<br />
if @customer.update_attributes(customer)<br />
flash.now[:message]=&#8221;Update successfully &#8220;<br />
end<br />
end<br />
else<br />
flash[:message]=&#8221;Page requested by you does not exists&#8221;<br />
end<br />
end<br />
end</p></blockquote>
<pre></pre>
<pre>
<span style="font-weight:bold;">Your View:</span>
<pre></pre>
</pre>
<blockquote><p>   &lt;% form_for :customer,  do |f| -%&gt;<br />
First Name:<br />
&lt;%= f.text_field :first_name  -%&gt;<br />
Last Name:<br />
&lt;%= f.text_field :last_name -%&gt;<br />
&lt;% <span style="font-weight:bold;">for</span> intr in <span style="font-weight:bold;">total_intrests</span> -%&gt;<br />
&lt;%= check_box_tag &#8220;customer[interest_ids][]&#8220;,&#8221;#{intr.id}&#8221;,<br />
interest(intr) -%&gt; # interest is a helper method<br />
&lt;%= &#8220;#{intr.name}&#8221; -%&gt;<br />
&lt;% end -%&gt;<br />
&lt;% end -%&gt;</p></blockquote>
<p>helper method</p>
<blockquote><p> def interest(i)</p></blockquote>
<blockquote><p>    if @customer</p></blockquote>
<blockquote><p>        @customer.interests.include?(i)</p></blockquote>
<blockquote><p>    else</p></blockquote>
<blockquote><p>        false</p></blockquote>
<blockquote><p>    end</p></blockquote>
<blockquote><p>end</p></blockquote>
<p>View generate a checkbox for every interest(all_interest=Interest.find(:all)). The name of the input is significant obviously. The trailing “[]” on the name means the end result will be the list of checked ids. This list will be stored on the @params['customer'] hash with the key ‘interest_ids’. When the controller calls @customer.update_attributes(@params[:customer]), it tries to call @customer.key= for each of the keys on @params[:customer]. What’s important to realize is that these keys don’t have to actually be attributes on the Customer model. All that’s important is that there’s a key= method on the model. Model automatically contains a “collection_ids=” method for habtm and has-many associations.</p>
<p>This method will load the objects identified by the ids and call the “interest=(list)” method on the model with the freshly loaded list. This method in turn, will compare the list to the current list of interests and delete/add interests as necessary</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syampal.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syampal.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syampal.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syampal.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syampal.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syampal.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syampal.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syampal.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syampal.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syampal.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syampal.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syampal.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syampal.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syampal.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syampal.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syampal.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=6&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syampal.wordpress.com/2007/06/20/multiple-checkboxes-with-habtm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/976420f4d88900731a768793d7c42986?s=96&#38;d=identicon" medium="image">
			<media:title type="html">syampal</media:title>
		</media:content>
	</item>
		<item>
		<title>How to generate CSV files in Rails</title>
		<link>http://syampal.wordpress.com/2007/06/15/how-to-generate-csv-files-in-rails/</link>
		<comments>http://syampal.wordpress.com/2007/06/15/how-to-generate-csv-files-in-rails/#comments</comments>
		<pubDate>Fri, 15 Jun 2007 10:05:09 +0000</pubDate>
		<dc:creator>syampal</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[ROR]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://syampal.wordpress.com/?p=7</guid>
		<description><![CDATA[Your controller code : require &#8216;csv&#8217; def export_to_csv @customers=CustomerInformation.find(:all) report = StringIO.new CSV::Writer.generate(report, &#8216;,&#8217;) do &#124;title&#124; title &#60;&#60; ['Id','Job Title','First Name','Last Name'] @customers.each do &#124;c&#124; title &#60;&#60; [c.id,c.job_title,c.first_name,c.last_name] end end report.rewind send_data(report.read,:type=&#62;&#8217;text/csv;charset=iso-8859-1; header=present&#8217;,:filename=&#62;&#8217;report.csv&#8217;, :disposition =&#62;&#8217;attachment&#8217;, :encoding =&#62; &#8216;utf8&#8242;) end Your view: &#60;% form_tag({ :action =&#62; :export_to_csv })do -%&#62; &#60;%= submit_tag &#8220;Export To CSV&#8221; -%&#62; &#60;% [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=7&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Your controller code :</p>
<blockquote><p><span style="font-weight:bold;">require</span> &#8216;csv&#8217;<br />
<span style="font-weight:bold;"></span><span style="font-weight:bold;">def export_to_csv</span></p>
<p>@customers=CustomerInformation.find(:all)</p>
<p>report = StringIO.new</p>
<p>CSV::Writer.generate(report, &#8216;,&#8217;) <span style="font-weight:bold;">do</span> |title|</p>
<p>title &lt;&lt; ['Id','Job Title','First Name','Last Name']</p>
<p>@customers.each <span style="font-weight:bold;">do</span> |c|</p>
<p>title &lt;&lt; [c.id,c.job_title,c.first_name,c.last_name]</p>
<p><span style="font-weight:bold;"></span>		end<span style="font-weight:bold;">     </span> <span style="font-weight:bold;">       </span> 	<span style="font-weight:bold;"></span></p>
<p>end</p>
<p>report.rewind</p>
<p>send_data(report.read,:type=&gt;&#8217;text/csv;charset=iso-8859-1;             	header=present&#8217;,:filename=&gt;&#8217;report.csv&#8217;,</p>
<p>:disposition =&gt;&#8217;attachment&#8217;, :encoding =&gt; &#8216;utf8&#8242;)</p>
<p>end</p></blockquote>
<pre>Your view:</pre>
<blockquote><p>       &lt;% form_tag({ :action =&gt;  :export_to_csv })do -%&gt;</p>
<p>&lt;%= submit_tag &#8220;Export To CSV&#8221; -%&gt;</p>
<p>&lt;% end -%&gt;</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syampal.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syampal.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syampal.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syampal.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syampal.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syampal.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syampal.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syampal.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syampal.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syampal.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syampal.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syampal.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syampal.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syampal.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syampal.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syampal.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=7&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syampal.wordpress.com/2007/06/15/how-to-generate-csv-files-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/976420f4d88900731a768793d7c42986?s=96&#38;d=identicon" medium="image">
			<media:title type="html">syampal</media:title>
		</media:content>
	</item>
		<item>
		<title>Active Scaffold</title>
		<link>http://syampal.wordpress.com/2007/03/26/active-scaffold/</link>
		<comments>http://syampal.wordpress.com/2007/03/26/active-scaffold/#comments</comments>
		<pubDate>Mon, 26 Mar 2007 13:03:02 +0000</pubDate>
		<dc:creator>syampal</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[ROR]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://syampal.wordpress.com/2007/03/26/active-scaffold/</guid>
		<description><![CDATA[Active scaffold is a plug in provide Ajax based user interface for a rails project. You can use it for Admin side activities * An AJAXified interface for creating, updating and deleting objects * Automatic handling of ActiveRecord associations * Sorting and Searching * CSS styling and theming support * Work on Firefox 1+, IE [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=8&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://activescaffold.com/">Active scaffold</a> is a plug in provide <span class="kLink"><font color="orange"><span class="kLink" style="color:orange !important;font-family:Verdana,sans-serif;font-weight:400;font-size:11.6667px;position:static;">Ajax</span></font></span> based user interface for a rails project. You can use it for Admin side activities</p>
<p>* An AJAXified interface for creating, updating and deleting objects<br />
* Automatic handling of ActiveRecord associations<br />
* Sorting and <span class="kLink"><font color="orange"><span class="kLink" style="color:orange !important;font-family:Verdana,sans-serif;font-weight:400;font-size:11.6667px;position:static;">Searching</span></font></span><br />
* CSS styling and theming support<br />
* Work on Firefox 1+, IE 6+ and Safari 2+<br />
* Released under the MIT License, the same one as Rails itself, so you can use it freely in your commercial applications.</p>
<p><span style="font-weight:bold;">Step-1:</span><br />
Install the plugin from the url:</p>
<p><span style="font-weight:bold;">./script/plugin install http://activescaffold.googlecode.com/svn/tags/active_scaffold</span></p>
<p><span style="font-weight:bold;">Step-2:</span><br />
Add to your layout</p>
<p><span style="font-weight:bold;">&lt;%= javascript_include_tag :defaults %&gt;<br />
&lt;%= active_scaffold_includes %&gt;</span></p>
<p><span style="font-weight:bold;">Step-3:</span><br />
Add to your controller</p>
<p><span style="font-weight:bold;">active_scaffold :model_name</span></p>
<p>Active scaffold requires a separate controller for a single model.If you do not want some attributes fields&#8230;<br />
Add to your Application controller</p>
<p><span style="font-weight:bold;"><span style="font-weight:bold;"> ActiveScaffold.set_defaults do |config|<br />
config.ignore_columns.add [:created_at, :updated_at, :status]<br />
end</span></span></p>
<p>or you can add to your controller for the attributes fields you want to to display</p>
<p>active_scaffold :TechniquesEmployed do |config|<br />
config.label = &#8220;Techniques Employed&#8221;<br />
<span style="font-weight:bold;"> config.columns = [:techniques_employed]</span><br />
columns[:techniques_employed].label = &#8220;Technique Employed&#8221;<br />
end</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syampal.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syampal.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syampal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syampal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syampal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syampal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syampal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syampal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syampal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syampal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syampal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syampal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syampal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syampal.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syampal.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syampal.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=8&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syampal.wordpress.com/2007/03/26/active-scaffold/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/976420f4d88900731a768793d7c42986?s=96&#38;d=identicon" medium="image">
			<media:title type="html">syampal</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails Resources</title>
		<link>http://syampal.wordpress.com/2005/11/02/rails-resources/</link>
		<comments>http://syampal.wordpress.com/2005/11/02/rails-resources/#comments</comments>
		<pubDate>Wed, 02 Nov 2005 10:42:19 +0000</pubDate>
		<dc:creator>syampal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://syampal.wordpress.com/2005/11/02/rails-resources/</guid>
		<description><![CDATA[Ruby and the Rails framework is the newest “hot thing” to hit the net. In order to help you learn, I have scoured the net for the best resources. This is what I came up with Enjoy. What is Ruby on Rails? http://www.onlamp.com/lpt/a/6251 RubyOnRails Wiki http://wiki.rubyonrails.com/rails Installing Ruby, Gems, and Rails http://wiki.rubyonrails.com/rails/pages/GettingStartedWithRails Instant Rails Instant [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=4&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entrybody">
<div class="snap_preview"> Ruby and the Rails framework is the newest “hot thing” to hit the net. In order to help you learn, I have scoured the net for the best resources. This is what I came up with <img src="http://edevil.wordpress.com/wp-includes/images/smilies/icon_smile.gif?w=480" alt=")" class="wp-smiley" /> Enjoy.<span></span></p>
<p><b>What is Ruby on Rails?</b><br />
<a href="http://www.onlamp.com/lpt/a/6251">http://www.onlamp.com/lpt/a/6251</a></p>
<p><b>RubyOnRails Wiki</b><br />
<a href="http://wiki.rubyonrails.com/rails">http://wiki.rubyonrails.com/rails</a></p>
<p><b>Installing Ruby, Gems, and Rails</b><br />
<a href="http://wiki.rubyonrails.com/rails/pages/GettingStartedWithRails">http://wiki.rubyonrails.com/rails/pages/GettingStartedWithRails</a></p>
<p><b>Instant Rails</b><br />
Instant Rails, a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all preconfigured and ready to run. There’s no installer; you simply drop it into the directory of your choice and run it. It does not modify your system environment.<br />
<a href="http://instantrails.rubyforge.org/">http://instantrails.rubyforge.org/</a></p>
<p><b>Locomotive for Mac OS X</b><br />
The Locomotive project is a quick start to Ruby on Rails development on Mac OS X, providing a sandboxed, no configuration, one-folder install of Ruby on Rails, SQLite, Lighttpd/Fastcgi, and much, much more.<br />
<a href="http://locomotive.sourceforge.net/">http://locomotive.sourceforge.net/</a></p>
<p><b> Getting started with the Ruby programming language.</b><br />
<a href="http://www.loudthinking.com/arc/000199.html"> http://www.loudthinking.com/arc/000199.html</a></p>
<p><b> Ryby Docs</b><br />
<a href="http://www.ruby-doc.org/"> http://www.ruby-doc.org/</a></p>
<p><b> ONLamp &#8211; Rolling with RoR</b><br />
Part 1: <a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html">http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html</a><br />
Part 2: <a href="http://www.onlamp.com/pub/a/onlamp/2005/03/03/rails.html">http://www.onlamp.com/pub/a/onlamp/2005/03/03/rails.html</a></p>
<p><b> Installing Rails on Tiger &#8211; watch Tiger get Railed!</b><br />
<a href="http://maczealots.com/tutorials/ruby-on-rails/"> http://maczealots.com/tutorials/ruby-on-rails/</a></p>
<p><b> Rolling with Ruby on Rails on Mac OS X Tiger (for beginners)</b><br />
<a href="http://www.tonyarnold.com/articles/2005/08/10/rolling-with-ruby-on-rails-on-mac-os-x-tiger-for-beginners"> http://www.tonyarnold.com/articles/2005/08/10/rolling-with-ruby-on-rails-on-mac-os-x-tiger-for-beginners</a></p>
<p><b> Why’s (Poignant) Guide to Ruby</b><br />
This is one of the best Ruby tutorials out there.<br />
HTML: <a href="http://poignantguide.net/ruby/">http://poignantguide.net/ruby/</a><br />
PDF: <a href="http://poignantguide.net/ruby/whys-poignant-guide-to-ruby.pdf">http://poignantguide.net/ruby/whys-poignant-guide-to-ruby.pdf</a></p>
<p><b> Ruby on Rails IDE</b><br />
<a href="http://www.radrails.org/"> http://www.radrails.org/</a></p>
<p><b> Rails &#8211; what goes where…</b><br />
<a href="http://www.slash7.com/articles/2005/03/06/rails-what-goes-where"> http://www.slash7.com/articles/2005/03/06/rails-what-goes-where</a><br />
<b><br />
</b>  Really Getting started in Rails<br />
<a href="http://www.slash7.com/articles/2005/01/24/really-getting-started-in-rails"> http://www.slash7.com/articles/2005/01/24/really-getting-started-in-rails</a></p>
<p><b> Cheat Sheets: </b><br />
Rails files: <a href="http://www.slash7.com/cheats/rails_files_cheatsheet.pdf">http://www.slash7.com/cheats/rails_files_cheatsheet.pdf</a><br />
Form Helpers: <a href="http://www.slash7.com/cheats/form_helpers.pdf">http://www.slash7.com/cheats/form_helpers.pdf</a><br />
ActiveRecord: <a href="http://www.slash7.com/cheats/activerecord_cheatsheet.pdf">http://www.slash7.com/cheats/activerecord_cheatsheet.pdf</a></p>
<p><b> 4 Days on Rails</b><br />
Rails is well documented on-line; in fact, possibly too well documented for beginners, with over 30,000 words of on-line documentation in the format of a reference manual. What’s missing is a roadmap (railmap?) pointing to the key pages that you need to know to get up and running in Rails development.<br />
<a href="http://www.rails4days.pwp.blueyonder.co.uk/Rails4Days.pdf"> http://www.rails4days.pwp.blueyonder.co.uk/Rails4Days.pdf</a></p>
<p><b> Nuby on Rails</b><br />
This is Geoffrey Grosenbach’s blog, covering Ruby, Ruby on Rails, graphic design, and other good stuff<br />
<a href="http://nubyonrails.com/"> http://nubyonrails.com/</a></p>
<p><b> railz0r3d!!</b><br />
<a href="http://www.mans.de/railz0r3d/"> http://www.mans.de/railz0r3d/</a></p>
<p><b> Exploring Ruby on Rails</b><br />
<a href="http://www.linuxjournal.com/article/8217"> http://www.linuxjournal.com/article/8217</a></p>
<p><b> Creating a small publication management application</b><br />
A tutorial/walkthrough for making a bit of a more blog like application, using a couple of more advanced features.<br />
<a href="http://manuals.rubyonrails.com/read/chapter/48"> http://manuals.rubyonrails.com/read/chapter/48</a></p>
<p><b> AJAX on Rails</b><br />
<a href="http://www.onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html"> http://www.onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html</a></p>
<p><b> AJAX Activity indicators with Rails</b><br />
<a href="http://mir.aculo.us/articles/2005/11/14/ajax-activity-indicators-with-rails-0-14-3"> http://mir.aculo.us/articles/2005/11/14/ajax-activity-indicators-with-rails-0-14-3</a><br />
<a href="http://www.ajaxian.com/archives/2005/11/ajax_activity_i.html"> http://www.ajaxian.com/archives/2005/11/ajax_activity_i.html</a></p>
<p><b> More Rails+AJAX stuff on Ajaxian</b><br />
<a href="http://www.ajaxian.com/archives/ruby/index.html"> http://www.ajaxian.com/archives/ruby/index.html</a></p>
<p><b> Making CAPTCHA</b><br />
<a href="http://frankhale.org/CAPTCHA_RoR_Tutorial.html"> http://frankhale.org/CAPTCHA_RoR_Tutorial.html</a></p>
<p><b> Some nice Ruby language tutorials.</b><br />
<a href="http://quickruby.blogspot.com/"> http://quickruby.blogspot.com/</a></p>
<p><b> Distributing Rails Applications</b><br />
<a href="http://www.erikveen.dds.nl/distributingrubyapplications/rails.html"> http://www.erikveen.dds.nl/distributingrubyapplications/rails.html</a></p>
<p><b> Rails API guide</b><br />
<a href="http://api.rubyonrails.com/"> http://api.rubyonrails.com</a></p>
<p><b> A Ruby On Rails tutorial for many-to-many relationships</b><br />
So far I’ve just glanced through this tutorial, but it appears to explain quite a bit how many to many relationships work in Ruby. Something you’ll need for any sort of real world application<br />
<a href="http://jrhicks.net/96"> http://jrhicks.net/96</a></p>
<p><b> How to build an AJAX-ed spellchecker with Ruby On Rails</b><br />
<a href="http://deezsombor.blogspot.com/2005/08/how-to-build-ajax-ed-spellchecker-with.html"> http://deezsombor.blogspot.com/2005/08/how-to-build-ajax-ed-spellchecker-with.html</a></p>
<p><b> Rails FAQ</b><br />
<a href="http://www.railsfaq.org/"> http://www.railsfaq.org/</a></p>
<p>ADVANCED</p>
<p><b> Sockets Programming in Ruby</b><br />
<a href="http://librenix.com/?inode=7535"> http://librenix.com/?inode=7535</a></p>
<p><b> Monitor network traffic with Ruby</b><br />
<a href="http://librenix.com/?inode=7502"> http://librenix.com/?inode=7502</a></p>
<p><b> Comparison: Ruby on Rails vs. J2EE</b><br />
<a href="http://www-128.ibm.com/developerworks/linux/library/wa-rubyonrails/?ca=dgr-lnxw16RubyAndJ2EE"> http://www-128.ibm.com/developerworks/linux/library/wa-rubyonrails/?ca=dgr-lnxw16RubyAndJ2EE</a></p>
<p><b> Looking for a RubyOnRails CMS?</b><br />
Typo is a lean engine that makes blogging easy. After you install Typo, a web-based admin interface handles configuration and management.<br />
<a href="http://typo.leetsoft.com/trac/"> http://typo.leetsoft.com/trac/</a></p>
<p><b> Need help?</b><br />
Sitepoint Forums &#8211; Ruby : <a href="http://www.sitepoint.com/forums/forumdisplay.php?f=227">http://www.sitepoint.com/forums/forumdisplay.php?f=227</a></p>
<p>That’s all I could find. Let me know if you find more.</p></div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syampal.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syampal.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syampal.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syampal.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syampal.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syampal.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syampal.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syampal.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syampal.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syampal.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syampal.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syampal.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syampal.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syampal.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syampal.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syampal.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=4&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syampal.wordpress.com/2005/11/02/rails-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/976420f4d88900731a768793d7c42986?s=96&#38;d=identicon" medium="image">
			<media:title type="html">syampal</media:title>
		</media:content>

		<media:content url="http://edevil.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">)</media:title>
		</media:content>
	</item>
		<item>
		<title>Just some rambling</title>
		<link>http://syampal.wordpress.com/2005/10/19/just-some-rambling/</link>
		<comments>http://syampal.wordpress.com/2005/10/19/just-some-rambling/#comments</comments>
		<pubDate>Wed, 19 Oct 2005 18:43:46 +0000</pubDate>
		<dc:creator>syampal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://syampal.wordpress.com/2005/10/19/just-some-rambling/</guid>
		<description><![CDATA[Hello, this is my first post on my new weblog. I downloaded Flock and eventually got navigated to wordpress.com. Here’s my take on Flock. Its a nice browser only for those who has a fast broadband and has a weblog and very familiar with web services like Flickr. Therefore, Flock would only attract about 0.001% [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=5&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entrybody">
<div class="snap_preview">Hello, this is my first post on my new weblog. I downloaded Flock and eventually got navigated to wordpress.com.</p>
<p>Here’s my take on Flock. Its a nice browser only for those who has a fast broadband and has a weblog and very familiar with web services like Flickr. Therefore, Flock would only attract about 0.001% of all internet users and most of them would say that they’re quite happy with Firefox and are not looking to change browsers.<span></span></p>
<p>I really like that integration with del.icio.us. But is it that hard to add the del.icio.us bookmarklet in your Firefox bookmarks and click it whenever you want to update your account? Nop, infact I think it gives better control over how I manage by bookmarks. So Firefox 1 : Flock 0.</p>
<p>Flock seems to have a nice blogging tool integrated. Okay fine, there is no good extension for Firefox with that functionality. But i’m thinking about building one myself. I’ll call it BloggerFox or something. Firefox 1 : Flock 1</p>
<p>Firefox has a huge repository of plugins and all those must be rebuilt to make it Flock compatible. Therefore, Firefox 2 : Flock 1</p>
<p>I’m an intermediate web designer/developer. Now when I design a web site, all I care about whether its working fine in the 3 browsers: IE, FF and Opera. I use services like browsershots.org to see what its like in IE/Mac and Camino. Now that Flock in the market, web designers will have an extra chore to check the design in Flock. Firefox 3 : Flock 1</p>
<p>I like the way it integrates with Flickr but who says that I wanna use images only from Flickr? It doesnt even let me edit HTML so there’s no other to way to add image. Thanks for your effort but i’d rather use something like <a href="http://www.wbloggar.com/" title="w.bloggar">w.bloggar</a>.</p>
<p>Conclusion. I know Flock is still a baby and maybe someday it will be a pretty powerful software with more defult features than Firefox. But FF will always remain on top and i’m sure developers will come up with new extension that can match the unique features Flock boasts. As for me, I’ll still with my good old foxy and i’m sure most people are thinking the same and really dont think there’s enough room for another browser in the scene.</p></div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syampal.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syampal.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syampal.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syampal.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syampal.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syampal.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syampal.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syampal.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syampal.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syampal.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syampal.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syampal.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syampal.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syampal.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syampal.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syampal.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syampal.wordpress.com&amp;blog=3263240&amp;post=5&amp;subd=syampal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syampal.wordpress.com/2005/10/19/just-some-rambling/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/976420f4d88900731a768793d7c42986?s=96&#38;d=identicon" medium="image">
			<media:title type="html">syampal</media:title>
		</media:content>
	</item>
	</channel>
</rss>
