<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Flvorful Bloggage: Category Rails</title>
    <link>http://blog.flvorful.com/articles/category/rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>SuperInPlaceControls: A new rails plugin from Flvorful</title>
      <description>&lt;p&gt;We just finished up our newest plugin: &lt;a href="http://os.flvorful.com/super_in_place_controls"&gt;SuperInPlaceControls&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;This is meant as a drop in replacement for the current in_place_edit_for method that was recently moved into a plugin. SuperInPlaceControls works with Rails 2.0, validations, and empty fields.&lt;/p&gt;


	&lt;p&gt;Check out the &lt;a href="http://os.flvorful.com/super_in_place_controls"&gt;SuperInPlaceControls&lt;/a&gt; page for more info, demos, examples and docs.&lt;/p&gt;


	&lt;p&gt;Have fun.&lt;/p&gt;


	&lt;p&gt;&amp;#8212;jake&lt;/p&gt;</description>
      <pubDate>Mon, 10 Dec 2007 17:12:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:fc402035-d012-47a0-a4ad-68baac7677bf</guid>
      <author>jake</author>
      <link>http://blog.flvorful.com/articles/2007/12/10/superinplacecontrols-a-new-rails-plugin-from-flvorful</link>
      <category>Rails</category>
      <category>ruby</category>
      <category>rails</category>
      <category>plaugins</category>
      <category>inplacecontrols</category>
      <category>ajax</category>
      <category>inplace</category>
      <trackback:ping>http://blog.flvorful.com/articles/trackback/9</trackback:ping>
    </item>
    <item>
      <title>The most hilarious Rails post ever</title>
      <description>&lt;p&gt;I was browsing around DZone and found a post by &lt;a href="http://jooto.com"&gt;Alex Bunardzic&lt;/a&gt; satirizing the now common &amp;#8220;Why I switched from Rails to &lt;span class="caps"&gt;WHATEVER&lt;/span&gt;&amp;#8221; posts that have been flying around the net. His language of choice: Assembler.  Take a &lt;a href="http://jooto.com/blog/index.php/2007/09/25/why-i-switched-back-from-rails-to-assembler/"&gt;read&lt;/a&gt; and dont blame me if you fall out of your chair.&lt;/p&gt;


	&lt;p&gt;PS  You must be a nerd to understand :)&lt;/p&gt;


	&lt;p&gt;&amp;#8212;jake&lt;/p&gt;</description>
      <pubDate>Thu, 27 Sep 2007 08:52:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:65deb3f3-10f3-4596-9afb-de21e4240705</guid>
      <author>jake</author>
      <link>http://blog.flvorful.com/articles/2007/09/27/the-most-hilarious-rails-post-ever</link>
      <category>Rails</category>
      <category>rails</category>
      <category>assembler</category>
      <category>funny</category>
    </item>
    <item>
      <title>Quick Zebra Striping in Rails</title>
      <description>&lt;p&gt;Striping table rows is usually a necessity when making  accessible web pages.  This can be a tedious task. Through the ages (and by ages I mean the last 10 years or so) there have been many ways to do this in many dynamic languages.  Everything from taking the modulo of the index when iterating through the set, to flipping a counter back and forth.&lt;/p&gt;


	&lt;p&gt;Well, if you&amp;#8217;re programming in rails, you get a much easier way to do it via the &lt;code&gt;cycle&lt;/code&gt; method.  Let me show you how easy it is:&lt;/p&gt;


&lt;pre&gt;
&amp;lt;table&amp;gt;
  &amp;lt;% @objects.each do |obj| %&amp;gt;
  &amp;lt;tr class="&amp;lt;%= cycle("even", "odd") %&amp;gt;"&amp;gt;
        &amp;lt;td&amp;gt;&amp;lt;%= obj.id %&amp;gt;&amp;lt;/td&amp;gt;
        &amp;lt;td&amp;gt;&amp;lt;%= obj.title %&amp;gt;&amp;lt;/td&amp;gt;
  &amp;lt;tr&amp;gt;
  &amp;lt;% end %&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;Simplicity itself.  Now as you loop through the set, it will cycle the class name of the row between &amp;#8220;even&amp;#8221; and &amp;#8220;odd&amp;#8221;.  Now all you need to do is set &lt;span class="caps"&gt;CSS&lt;/span&gt; values for those classes and your done.&lt;/p&gt;


Here is a quick example of a &lt;span class="caps"&gt;CSS&lt;/span&gt; class for odd:
&lt;pre&gt;
.odd{
    background:#dedede;
}
&lt;/pre&gt;

	&lt;p&gt;Gotta love rails.&lt;/p&gt;


	&lt;p&gt;&amp;#8212;jake&lt;/p&gt;</description>
      <pubDate>Sun, 12 Aug 2007 08:57:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4744aa5a-2ceb-467b-8341-392155f1318d</guid>
      <author>jake</author>
      <link>http://blog.flvorful.com/articles/2007/08/12/quick-zebra-striping-in-rails</link>
      <category>Rails</category>
      <category>rails</category>
      <category>views</category>
      <category>cycle</category>
      <category>stripe</category>
      <category>table</category>
    </item>
    <item>
      <title>Rescuing Ruby</title>
      <description>&lt;p&gt;Now, before anyone goes crazy, this article has nothing to do with saving ruby from something, i just couldnt think of a better title.  We will be talking about &lt;code&gt;rescue&lt;/code&gt; and some cool tricks that can be done with it.&lt;/p&gt;


	&lt;p&gt;As most of you vets know, every thing in Ruby is an object.  What most noobs dont realize is how powerful that can be and how concise your code can become.  Of course, the flip side of that problem is what i call, newbie-come-expert.  It&amp;#8217;s basically the stage in a noob&amp;#8217;s study of a language where they think they know enough to write really cool software.  What actually happens is they end up with code like this:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;@objects.map {|e| [e.id, e.title]}.sort {|a, b| a.last &amp;lt;=&amp;gt; b.last}.map {|e| e.join(" ")}.join("\n")&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Lovely.&lt;/p&gt;


	&lt;p&gt;Dont worry noobs, everyone does it. I&amp;#8217;m still trying to undo it from some of my older code.&lt;/p&gt;


	&lt;p&gt;Anyway, my point is, sometimes Ruby&amp;#8217;s dynamicism (say that 3 times fast) can lead to messy code so use this tip wisely.&lt;/p&gt;


	&lt;p&gt;On to the actual tip.&lt;/p&gt;


	&lt;p&gt;So, like I said before, &lt;span class="caps"&gt;EVERYTHING&lt;/span&gt; in Ruby is an object, even the remains of a &lt;code&gt;rescue&lt;/code&gt; clause or an inline &lt;code&gt;rescue&lt;/code&gt; which is what we will be playing with here.&lt;/p&gt;


	&lt;p&gt;How many of you have done this:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;@person = Person.find(some_id)&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;only to get the following error:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;ActiveRecord::RecordNotFound: Couldn't find Person with ID=22&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s pretty annoying, mainly because this type of thing could easily happen in a live app. A user goes to find  something that isnt there.  One way around it is to have a rescue at the end of the method, but what if you have multiple finds that could throw errors?  What if you still need to be able to proceed with whatever you are doing, even if the object isnt found?&lt;/p&gt;


	&lt;p&gt;This is where inline &lt;code&gt;rescue&lt;/code&gt;&amp;#8217;s can help.&lt;/p&gt;


	&lt;p&gt;Now you can pull all of your finds together and end them with a rescue.&lt;/p&gt;


Example:
Let&amp;#8217;s say you had the following code:
&lt;pre&gt;
@person = Person.find(params[:id])
@employee = Employee.find(params[:employee_id])
&lt;/pre&gt;

	&lt;p&gt;Now, if either of these finds fail, you will get an error.  Instead of rescuing the entire method, you can resuce each statement and make the return value &lt;code&gt;nil&lt;/code&gt; and check for &lt;code&gt;nil&lt;/code&gt; like you normally would.&lt;/p&gt;


New code:
&lt;pre&gt;
@person = Person.find(params[:id]) rescue nil
@employee = Employee.find(params[:employee_id]) rescue nil
&lt;/pre&gt;

	&lt;p&gt;Now when you cant find the ID, it will rescue and just set the variables to nil and move on.&lt;/p&gt;


	&lt;p&gt;You can also set the rescues to another default datatype instead of nil.&lt;/p&gt;


	&lt;p&gt;Now, you may be saying, &amp;#8220;Wait, why would a user need to enter an id&amp;#8221;.  Well, one example is an order id, or a tracking number.  Anyway, I have run across this a couple of times and thought i&amp;#8217;d write something about it.&lt;/p&gt;


	&lt;p&gt;until next time.&lt;/p&gt;


	&lt;p&gt;&amp;#8212;jake&lt;/p&gt;</description>
      <pubDate>Sat, 11 Aug 2007 19:07:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2b7f0456-3249-47ba-a231-1068a7d8701a</guid>
      <author>jake</author>
      <link>http://blog.flvorful.com/articles/2007/08/11/rescuing-ruby</link>
      <category>Rails</category>
      <category>rails</category>
      <category>rescue</category>
      <category>ruby</category>
      <trackback:ping>http://blog.flvorful.com/articles/trackback/2</trackback:ping>
    </item>
    <item>
      <title>Rails Plugin -  Jake's Rails Toolbox</title>
      <description>&lt;p&gt;hello all,&lt;/p&gt;

&lt;p&gt;Ive recreated my old plugin and updated with some new features.&lt;/p&gt;
&lt;p&gt;I created this plugin as a hodgepodge of different methods/hacks that i have found useful over the course of developing Rails Apps.  I packaged it up as one plugin because most of the methods have nothing to do with each other, but i find them are very useful going from project to project.&lt;/p&gt;

&lt;p&gt;Lets talk about them:&lt;/p&gt;

&lt;h3&gt;ActiveRecord Hacks: &lt;/h3&gt;

&lt;h4&gt;1. Dynamic &amp;#8220;nice_date&amp;#8221;&lt;/h4&gt;

&lt;p&gt;Basically, i got tired of typing object.created_at.strftime(&amp;#8220;%m-%d-%Y&amp;#8221;)  so i came up with the following method_missing hack for any Time attribute in an ActiveRecord object. Just prepend &amp;#8220;nice_&amp;#8221; in  front of any Datetime     attribute and you will get a nicely formatted date string.  Plus some other    goodies :)&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
object.created_at                                          
# =&amp;gt; Mon Dec 04 12:36:55 CST 2006
object.nice_created_at                                
# =&amp;gt; "12-04-2006"  (mm-dd-YYYY)
object.nice_created_at(:euro)                 
# =&amp;gt; "04-12-2006"  (dd-mm-YYYY)

plus, for you guys (and gals) that like using slashes instead of dashes:
object.nice_created_at(:slash)                 
# =&amp;gt; "12/04/2006"  (mm/dd/YYYY)
object.nice_created_at(:euro_slash)     
# =&amp;gt; "04/12/2006"  (dd/mm/YYYY)

and finally:
object.nice_created_at(:rss)                     
# =&amp;gt; "Mon, 04 Dec 2006 12:36:55 -0600"  (rfc822)

&lt;/pre&gt;    
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;&lt;span class="caps"&gt;NOTE&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;
 The attribute must be an instance of Time or a NoMethodError will be thrown&lt;/p&gt;&lt;/p&gt;

&lt;h4&gt;2. Dynamic &lt;span class="caps"&gt;&lt;span class="caps"&gt;SEO&lt;/span&gt;&lt;/span&gt; formatting.&lt;/h4&gt;
&lt;p&gt;Any method that returns a string can use this dynamic method. This method will create an &lt;span class="caps"&gt;&lt;span class="caps"&gt;SEO&lt;/span&gt;&lt;/span&gt; friendly string out of the attribute chosen (for use mainly in &lt;span class="caps"&gt;&lt;span class="caps"&gt;URLS&lt;/span&gt;&lt;/span&gt;).  It will append the objects id (not the object_id, but the id key from the database) so that you can use params[:id] and not have to create new routes.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
puts object.id                         
# =&amp;gt; 1
object.title = " Rails is freaking awesome, didn't you know that?  " 
puts object.seo_title         
# =&amp;gt; "1-rails-is-freaking-awesome-didnt-you-know-that" 
&lt;/pre&gt;&lt;/p&gt;

&lt;h4&gt;3. nice_name&lt;/h4&gt;
&lt;p&gt;This one is pretty simple.  I found myself adding this same method to alot of my applications.  Basically it looks for an attribute called &amp;#8220;first_name&amp;#8221; and one called &amp;#8220;last_name&amp;#8221; and combines them together with a space in between.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;    &lt;/p&gt;
&lt;pre&gt;
object.first_name    = "jake" 
object.last_name     = "varghese" 
object.nice_name  
# =&amp;gt; "jake varghese" 
&lt;/pre&gt;
    &lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;&lt;span class="caps"&gt;NOTE&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/strong&gt;
    If the method doesn&amp;#8217;t have &lt;span class="caps"&gt;&lt;span class="caps"&gt;EITHER&lt;/span&gt;&lt;/span&gt; first_name or last_name, then a NoMethodError 
    will be thrown.  It must have both attributes&lt;/p&gt;&lt;/p&gt;

&lt;h4&gt;4. create/new from &lt;span class="caps"&gt;&lt;span class="caps"&gt;XML&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Create an ActiveRecord Object from &lt;span class="caps"&gt;&lt;span class="caps"&gt;XML&lt;/span&gt;&lt;/span&gt;.  This method relies on the basics of AR&amp;#8217;s current to_xml method (basically, it must be formatted the same).The differences between new_from_xml and create_from_xml are the same as the differences    between AR.new and AR.create&lt;/p&gt;

&lt;p&gt;If your &lt;span class="caps"&gt;&lt;span class="caps"&gt;XML&lt;/span&gt;&lt;/span&gt; string contains multiple records, it will parse out each record and create an object.  The &amp;#8220;multiple record&amp;#8221; call returns an array like find(:all)

&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
person = Person.new_from_xml(xml_string)
# =&amp;gt; #&amp;lt;Project:0x2430758 @attributes={"prototype_url"=&amp;gt;nil, "company"=&amp;gt;"some value", 
"order_id"=&amp;gt;45564, "phone_number"=&amp;gt;555544455, "created_at"=&amp;gt;nil, 
"email_address"=&amp;gt;lkjlkjL@jfgg.com}, @new_record=true&amp;gt;

&lt;/pre&gt;&lt;/p&gt;

&lt;h3&gt;String Hacks:&lt;/h3&gt;
&lt;h4&gt;1.  &lt;span class="caps"&gt;&lt;span class="caps"&gt;SEO&lt;/span&gt;&lt;/span&gt; friendly.&lt;/h4&gt;
&lt;p&gt;This method is used in the AR seo hack.  It takes a string and makes it seo friendly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;
&lt;pre&gt;
c.title = " Rails is freaking awesome, didn't you know that?  " 
c.title.seo_friendly        
# =&amp;gt; "rails-is-freaking-awesome-didnt-you-know-that" 
&lt;/pre&gt;&lt;/p&gt;

&lt;h3&gt;Float Hacks:&lt;/h3&gt;
&lt;h4&gt;1. to_s override.&lt;/h4&gt;
&lt;p&gt;I really hate using sprintf, mainly because i always have to go online and look up the syntax.  I figured i make that a little easier. Now you can print floats with different precision as easily as:&lt;/p&gt;
&lt;strong&gt;Example&lt;/strong&gt;
&lt;pre&gt;
4.123456.to_s(1)    # =&amp;gt; "4.1" 
4.123456.to_s(3)    # =&amp;gt; "4.12" 
4.123456.to_s(3)    # =&amp;gt; "4.123" 
4.123456.to_s(4)    # =&amp;gt; "4.1235" (Note the auto rounding from 4.123456)
4.123456.to_s       # =&amp;gt; "4.123456" 

&lt;/pre&gt;    

&lt;h3&gt;Hash Hacks:&lt;/h3&gt;
&lt;h4&gt;1.  Method Missing hack to allow for easy hash referencing.&lt;/h4&gt;
I can never remember whether the Hash i am playing with has symbols for keys or strings. I also dont like typing the brackets (not all text editors have the cool &amp;#8220;auto close brace&amp;#8221; feature).  That&amp;#8217;s why i came up with this method missing hack.  Instead of explaining what it does, I&amp;#8217;ll just show you.

    &lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
hsh =  {"project"=&amp;gt;
                {
                    "prototype_url"=&amp;gt;nil,
            "designer_id"=&amp;gt;2,
          "finished_at"=&amp;gt;nil,
          "phone_number"=&amp;gt;"512225555",
          "website"=&amp;gt;"http://www.ggg.com",
          "first_name"=&amp;gt;"test" 
         }
        }
hsh.project                             
#=&amp;gt;  {"prototype_url"=&amp;gt;nil, "designer_id"=&amp;gt;2, "finished_at"=&amp;gt;nil, 
"phone_number"=&amp;gt;"512225555", "website"=&amp;gt;"http://www.ggg.com", 
"first_name"=&amp;gt;"test"}

hsh.project.prototype_url 
#=&amp;gt; nil
hsh.project.designer_id     
#=&amp;gt; 2
hsh.project.first_name         
#=&amp;gt; test

&lt;/pre&gt;
&lt;p&gt;So instead of hsh[&amp;#8220;project&amp;#8221;] you can just write hsh.project&lt;/p&gt;&lt;/p&gt;

&lt;p&gt;and that&amp;#8217;s it.  If you want to try it yourself, just run&lt;/p&gt;
&lt;pre&gt;script/plugin install http://jakes-rails-toolbox.googlecode.com/svn/trunk/jakes_toolbox &lt;/pre&gt;

&lt;p&gt;You can also checkout the latest rev via &lt;span class="caps"&gt;&lt;span class="caps"&gt;SVN&lt;/span&gt;&lt;/span&gt; at: &lt;/p&gt;

&lt;pre&gt;svn checkout http://jakes-rails-toolbox.googlecode.com/svn/trunk/ vendor/plugins &lt;/pre&gt;</description>
      <pubDate>Tue, 10 Jul 2007 13:56:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d5135407-e1dc-49fd-a664-b2de70fc7316</guid>
      <author>jake</author>
      <link>http://blog.flvorful.com/articles/2007/07/10/rails-plugin-jakes-rails-toolbox</link>
      <category>Rails</category>
      <category>rails</category>
      <category>plugins</category>
      <category>hacks</category>
      <trackback:ping>http://blog.flvorful.com/articles/trackback/7</trackback:ping>
    </item>
    <item>
      <title>New Rails Plugin - Acts As Noteable</title>
      <description>&lt;p&gt;So I was at work and I needed to add notes to multiple models in the same project (before i only had to worry about one model with notes, so it was pretty straightforward).  So i bit down and knocked out this little plugin.&lt;/p&gt;

&lt;p&gt;I borrowed heavily from Acts As Rateable by &lt;a href="http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/"&gt;Juixe&lt;/a&gt;&lt;/p&gt;

    &lt;h3&gt;Installation&lt;/h3&gt;

    &lt;p&gt;Run the following command: &lt;/p&gt;

&lt;code&gt;script/plugin install http://acts-as-noteable.googlecode.com/svn/trunk/acts_as_noteable &lt;/code&gt;

    &lt;p&gt;The install will try and copy some scripts over, this works sometimes. If you get a rake error do the following:&lt;/p&gt;

    &lt;ol&gt;
    &lt;li&gt;cd vendor/plugins/acts_as_noteable&lt;/li&gt;
        &lt;li&gt;rake update_scripts&lt;/li&gt;

    &lt;/ol&gt;

    &lt;p&gt;Create a new rails migration:&lt;/p&gt;

    &lt;p&gt;&lt;code&gt;script/generate migration add_notes_to_project&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;and add the following self.up and self.down methods &lt;/p&gt;

&lt;pre&gt;
    def self.up
        create_table "notes", :force =&amp;amp;gt; true do |t|
            t.column "from", :string, :limit =&amp;amp;gt; 50, :default =&amp;amp;gt; "" 
            t.column "body", :text, :default =&amp;amp;gt; "" 
            t.column "created_at", :datetime, :null =&amp;amp;gt; false 
            t.column "noteable_id", :integer, :default =&amp;amp;gt; 0, :null =&amp;amp;gt; false 
            t.column "noteable_type", :string, :limit =&amp;amp;gt; 15, :default =&amp;amp;gt; "", :null =&amp;amp;gt; false 
        end 
    end 

    def self.down
        drop_table :notes 
    end 
 &lt;/pre&gt;

    &lt;p&gt;(one day i&amp;#8217;ll add a migration script to the plugin to automatically add this :) )&lt;/p&gt;

    &lt;p&gt;After that run &amp;#8220;rake migrate&amp;#8221; to create the table.&lt;/p&gt;

    &lt;p&gt;Now all you need to do is call acts_as_noteable in your model:&lt;/p&gt;

&lt;pre&gt;
class Model &amp;amp;lt; ActiveRecord::Base
  acts_as_noteable
end
&lt;/pre&gt;

    &lt;p&gt;Now your model is notable, but that&amp;#8217;s not all.&lt;/p&gt;

    &lt;p&gt;For only 19.95 you get a Helper method to help you create a nice form.  Ok, so i am not actually charging, but whatever.&lt;/p&gt;

    &lt;p&gt;Here&amp;#8217;s how the helper works.&lt;/p&gt;

    &lt;p&gt;In the view you want to display notes in put the following:&lt;/p&gt;

    &lt;p&gt;&lt;code&gt;&amp;amp;lt;%= display_notes(object) %&amp;amp;gt;&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;This will create a div filled with the note entries for the object and a &lt;span class="caps"&gt;&lt;span class="caps"&gt;AJAX&lt;/span&gt;&lt;/span&gt; form to add new notes to the object as well as delete notes from the object.  The add and delete methods are stored in the notes_controller.rb that gets copied over into your app/controllers directory.&lt;/p&gt;

    &lt;p&gt;The full implementation for this method is:&lt;/p&gt;

    &lt;p&gt;&lt;code&gt;&amp;amp;lt;%= display_notes(obj, partial_name = "notes/note", controller_name = "notes") %&amp;amp;gt;&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;I added the partial name and controller name in case you have multiple controllers in different folders, this way you can display notes for objects whose controllers are buried deep in a folder.&lt;/p&gt;

    &lt;p&gt;Example:  I have an &amp;#8220;admin&amp;#8221; folder for all the backend stuff and I needed a way to reference the notes controller from different places, otherwise &lt;span class="caps"&gt;&lt;span class="caps"&gt;RAILS&lt;/span&gt;&lt;/span&gt; will assume you are trying to reference a controller from the current folder your in.&lt;/p&gt;

    &lt;p&gt;After you have called display_notes, your done.&lt;/p&gt;

&lt;p&gt;Note**  This plugin has not been tested with Rails 2.0 yet&lt;p&gt;
    &lt;p&gt;peace&lt;/p&gt;
&lt;p&gt;&amp;#8212;jake&lt;/p&gt;</description>
      <pubDate>Sun, 10 Jun 2007 13:51:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c73aed0a-4d25-4ec8-9581-c1b3424d74ae</guid>
      <author>jake</author>
      <link>http://blog.flvorful.com/articles/2007/06/10/new-rails-plugin-acts-as-noteable</link>
      <category>Rails</category>
      <category>noteable</category>
      <category>plugins</category>
      <category>rails</category>
      <category>ruby</category>
      <trackback:ping>http://blog.flvorful.com/articles/trackback/6</trackback:ping>
    </item>
  </channel>
</rss>
