<?xml version="1.0" encoding="UTF-8"?>
<tricks type="array">
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content>&lt;h3&gt;Now &lt;span class=&quot;caps&quot;&gt;GAP 2&lt;/span&gt;.6.0 has been released. The new version is optimised for &lt;span class=&quot;caps&quot;&gt;GIMP 2&lt;/span&gt;.6 and offers some new functionality.&lt;/h3&gt;


&lt;pre&gt;
&lt;code&gt;
Storyboard undo support

Storyboard section support. complex scenes can be described within subsections where each subsection can arrange multiple clips in multiple individual video tracks.

Storyboard clips support new deinterlace modes Odd First, Even First

Player supports extracting audio track when playing clips that refere to a videofile that has one or more audiotrack(s) (the extracted audio can be used for audioplayback if audiosupport is enabled and wavplay is installed)

Filtermacro processing now supports mapping to persistent drawable id references.
This allows applying recorded filtermacros in another gimp session in case the recorded last values buffer data contains references to drawable ids. such as the drawable for a bump map in the plug_in_bump_map, or all the layers that were used to map on a quader in plug_in_map_object.

The persistent references can refer to anim frames (series of numbered images), multilayer images, or videofiles.

Filtermacros can be applied with fixed or varying values in storyboard clips. For varying values 2 filtermacros are required to provide from and to values. Iteration of persistent drawable ids is supported in case both refer to the same image, anim frame series or the same videofile.

video extract supports generating transparency via bluebox effect.

the master video encoder dialog now stays open while the encoder
process is running and shows encoding progress (with Cancel option)

lossless frame extract and videocut for MJPEG encoded videoclips
is supported by the storyboard processor and in the AVI1, FFMPEG and RAWFRAMES encoders (via dont recode flag)

frontends for old external video encoders and the old xanim based
frame extract plug-in are not bulit per default.

Modify Frames now supports creation of grayscale layer from
alpha channel, or layermask or mix of both

added wrapper for rotate any angle.
(provides support for animated apply in &quot;filter all layers&quot; or in fltermacros for rotation effects in storyboard clips)

added wrapper for the resynthesizer
(provides support for animated apply of the 3rd party plug-in resynthesizer)

external libs for vidoe read and write access were updated to ffmpeg-0.5 and libmpeg3-1.8

bugfixes and updates for the use with GIMP-2.6.x releases.(see ChangeLog for details)
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;&lt;a href=&quot;ftp://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/&quot;&gt;Source code is available here&lt;/a&gt;&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h3. Now GAP 2.6.0 has been released. The new version is optimised for GIMP 2.6 and offers some new functionality.

&lt;pre&gt;
&lt;code&gt;
Storyboard undo support

Storyboard section support. complex scenes can be described within subsections where each subsection can arrange multiple clips in multiple individual video tracks.

Storyboard clips support new deinterlace modes Odd First, Even First

Player supports extracting audio track when playing clips that refere to a videofile that has one or more audiotrack(s) (the extracted audio can be used for audioplayback if audiosupport is enabled and wavplay is installed)

Filtermacro processing now supports mapping to persistent drawable id references.
This allows applying recorded filtermacros in another gimp session in case the recorded last values buffer data contains references to drawable ids. such as the drawable for a bump map in the plug_in_bump_map, or all the layers that were used to map on a quader in plug_in_map_object.

The persistent references can refer to anim frames (series of numbered images), multilayer images, or videofiles.

Filtermacros can be applied with fixed or varying values in storyboard clips. For varying values 2 filtermacros are required to provide from and to values. Iteration of persistent drawable ids is supported in case both refer to the same image, anim frame series or the same videofile.

video extract supports generating transparency via bluebox effect.

the master video encoder dialog now stays open while the encoder
process is running and shows encoding progress (with Cancel option)

lossless frame extract and videocut for MJPEG encoded videoclips
is supported by the storyboard processor and in the AVI1, FFMPEG and RAWFRAMES encoders (via dont recode flag)

frontends for old external video encoders and the old xanim based
frame extract plug-in are not bulit per default.

Modify Frames now supports creation of grayscale layer from
alpha channel, or layermask or mix of both

added wrapper for rotate any angle.
(provides support for animated apply in &quot;filter all layers&quot; or in fltermacros for rotation effects in storyboard clips)

added wrapper for the resynthesizer
(provides support for animated apply of the 3rd party plug-in resynthesizer)

external libs for vidoe read and write access were updated to ffmpeg-0.5 and libmpeg3-1.8

bugfixes and updates for the use with GIMP-2.6.x releases.(see ChangeLog for details)
&lt;/code&gt;
&lt;/pre&gt;

&quot;Source code is available here&quot;:ftp://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/</content-textile>
    <created-at type="datetime">2009-06-23T01:24:27+02:00</created-at>
    <creator-id type="integer">69</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">910</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">5</nvotes>
    <permalink>gap_for_gimp_2_6</permalink>
    <published-at type="datetime">2009-06-25T04:04:32+02:00</published-at>
    <state>published</state>
    <summary>GAP is a collection of GIMP plugins that make it possible to create animations as sequences of single frames. The result can be saved as animated GIF, AVI or MPEG file (external libraries are used for this).</summary>
    <title>GAP for GIMP 2.6</title>
    <updated-at type="datetime">2009-06-27T03:51:53+02:00</updated-at>
    <updater-id type="integer">110</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2009-04-20T20:12:10+02:00</created-at>
    <creator-id type="integer">192</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">590</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>how_to_install_adobe_flash_player_on_debian_lenny</permalink>
    <published-at type="datetime">2009-04-28T06:01:02+02:00</published-at>
    <state>published</state>
    <summary>The open source flash player provided by Debian Lenny has some quirks like stuttering video playback. Learn how to replace the open source flash player provided by Debian with the more functional Adobe Flash Player.</summary>
    <title>How to install Adobe Flash player on Debian Lenny</title>
    <updated-at type="datetime">2009-04-28T08:01:03+02:00</updated-at>
    <updater-id type="integer">180</updater-id>
    <url>http://www.netdip.com/how-to-install-adobe-flash-player-on-debian-lenny/</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-08-30T23:12:49+02:00</created-at>
    <creator-id type="integer">99</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">404</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>exaile_music_player_music_player_for_gtk_in_opensuse</permalink>
    <published-at type="datetime">2008-08-31T06:49:54+02:00</published-at>
    <state>published</state>
    <summary>Exaile is a music player aiming to be similar to KDE&#8217;s Amarok, but for GTK+ and written in Python. It incorporates many of the cool things from Amarok (and other media players) like automatic fetching of album art, handling of large libraries, lyrics fetching, artist/album information via Wikipedia, Last.fm submission support, and optional iPod support via a plugin.</summary>
    <title>Exaile Music Player - Music Player for GTK+ in openSUSE</title>
    <updated-at type="datetime">2008-08-31T08:49:57+02:00</updated-at>
    <updater-id type="integer">69</updater-id>
    <url>http://www.susegeek.com/multimedia/exaile-music-player-music-player-for-gtk-in-opensuse/</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-07-26T15:02:09+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">348</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">5</nvotes>
    <permalink>mobilize_your_rails_application_with_mobile_fu</permalink>
    <published-at type="datetime">2008-07-26T20:57:50+02:00</published-at>
    <state>published</state>
    <summary>Let's face it, iPhone interfaces are awesome, but they can only cater to a fraction of the mobile market. What are you to do if you want to satisfy the rest of the mobile world? Mobile Fu helps to make this job much easier by automatically detecting mobile devices that access your Rails application.</summary>
    <title>Mobilize Your Rails Application with Mobile Fu</title>
    <updated-at type="datetime">2008-07-28T19:09:33+02:00</updated-at>
    <updater-id type="integer">3</updater-id>
    <url>http://intridea.com/2008/7/21/mobilize-your-rails-application-with-mobile-fu</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content>&lt;h2&gt;The Userstamp Plugin&lt;/h2&gt;


	&lt;p&gt;If you don&amp;#8217;t know what the plugin in does, have a look at the &lt;a href=&quot;http://delynnberry.com/projects/userstamp&quot;&gt;project site&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;The Userstamp Plugin extends ActiveRecord::Base to add automatic updating of &#8216;creator&#8217;, &#8216;updater&#8217;, and &#8216;deleter&#8217; attributes. It is based loosely on the ActiveRecord::Timestamp module.&lt;/p&gt;


	&lt;h2&gt;Problem&lt;/h2&gt;


	&lt;p&gt;If you now try to save a stampable record on the console, you get an error message:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
&amp;gt;&amp;gt; myobject.save
ActiveRecord::RecordNotFound: Couldn't find User without an ID
  from /project/vendor/rails/activerecord/lib/active_record/base.rb:1262:in `find_from_ids'
  from /project/vendor/rails/activerecord/lib/active_record/base.rb:503:in `find'
  from /project/vendor/plugins/userstamp/lib/stamper.rb:31:in `stamper'
  from /project/vendor/plugins/userstamp/lib/stampable.rb:121:in `has_stamper?'
  from /project/vendor/plugins/userstamp/lib/stampable.rb:133:in `set_updater_attribute'
&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Solution&lt;/h2&gt;


	&lt;p&gt;As soon as we set the stamper, everything works as expected:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
&amp;gt;&amp;gt; User.stamper = User.find(1)
&amp;gt;&amp;gt; myobject.save
=&amp;gt; true
&lt;/code&gt;
&lt;/pre&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. The Userstamp Plugin

p. If you don't know what the plugin in does, have a look at the &quot;project site&quot;:http://delynnberry.com/projects/userstamp


p. The Userstamp Plugin extends ActiveRecord::Base to add automatic updating of &#8216;creator&#8217;, &#8216;updater&#8217;, and &#8216;deleter&#8217; attributes. It is based loosely on the ActiveRecord::Timestamp module.


h2. Problem

p. If you now try to save a stampable record on the console, you get an error message:

&lt;pre&gt;
&lt;code&gt;
&gt;&gt; myobject.save
ActiveRecord::RecordNotFound: Couldn't find User without an ID
  from /project/vendor/rails/activerecord/lib/active_record/base.rb:1262:in `find_from_ids'
  from /project/vendor/rails/activerecord/lib/active_record/base.rb:503:in `find'
  from /project/vendor/plugins/userstamp/lib/stamper.rb:31:in `stamper'
  from /project/vendor/plugins/userstamp/lib/stampable.rb:121:in `has_stamper?'
  from /project/vendor/plugins/userstamp/lib/stampable.rb:133:in `set_updater_attribute'
&lt;/code&gt;
&lt;/pre&gt;


h2. Solution

p. As soon as we set the stamper, everything works as expected:

&lt;pre&gt;
&lt;code&gt;
&gt;&gt; User.stamper = User.find(1)
&gt;&gt; myobject.save
=&gt; true
&lt;/code&gt;
&lt;/pre&gt;</content-textile>
    <created-at type="datetime">2008-06-20T17:27:36+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">275</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">5</nvotes>
    <permalink>userstamp_plugin_and_the_rails_console</permalink>
    <published-at type="datetime">2008-06-20T17:49:57+02:00</published-at>
    <state>published</state>
    <summary>The Ruby on Rails plugin userstamp automatically sets created_by and updated_by and works much like the ActiveRecord::Timestamp module (created_at and updated_at). But when you try to save a record on the Rails console, it suddenly returns an error.</summary>
    <title>Userstamp Plugin and the Rails Console</title>
    <updated-at type="datetime">2008-06-22T18:08:22+02:00</updated-at>
    <updater-id type="integer">3</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content>&lt;h2&gt;How it works&lt;/h2&gt;


	&lt;p&gt;They keyword is stored on the server, so it is never revealed to the client. Processing is performed on the server-side via an &lt;span class=&quot;caps&quot;&gt;AJAX&lt;/span&gt; request and the decrypted redirect is returned to the client, opening a mail composer window&#8230; just like normal mailto link.&lt;/p&gt;


	&lt;h2&gt;Usage&lt;/h2&gt;


	&lt;p&gt;&lt;a href=&quot;http://howflow.com/trick/file/220/cipher_mail.zip&quot;&gt;Download the plugin from the file area&lt;/a&gt; of this trick (the original svn is gone) and install it in &lt;strong&gt;vendor/plugins&lt;/strong&gt;.&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
&amp;lt;%= ciphermail_to &quot;John Smith&quot;, &quot;someone@somedomain.com&quot; %&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Copyright&lt;/h2&gt;


	&lt;p&gt;Copyright &#169; 2007 Michael Behan aka &amp;#8220;JabberWock&amp;#8221; (jabberwock /AT tenebrous /DOT com) Released under the &lt;span class=&quot;caps&quot;&gt;BSD&lt;/span&gt; license&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. How it works

p. They keyword is stored on the server, so it is never revealed to the client. Processing is performed on the server-side via an AJAX request and the decrypted redirect is returned to the client, opening a mail composer window&#8230; just like normal mailto link.


h2. Usage

p. &quot;Download the plugin from the file area&quot;:http://howflow.com/trick/file/220/cipher_mail.zip of this trick (the original svn is gone) and install it in *vendor/plugins*.


&lt;pre&gt;
&lt;code&gt;
&lt;%= ciphermail_to &quot;John Smith&quot;, &quot;someone@somedomain.com&quot; %&gt;
&lt;/code&gt;
&lt;/pre&gt;


h2. Copyright

p. Copyright &#169; 2007 Michael Behan aka &quot;JabberWock&quot; (jabberwock /AT tenebrous /DOT com) Released under the BSD license</content-textile>
    <created-at type="datetime">2008-06-02T11:00:53+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file>/var/rails/howflow/public/trick/file/220/cipher_mail.zip</file>
    <id type="integer">220</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">1</nvotes>
    <permalink>rails_plugin_ciphermail_backup_archive_from_svn</permalink>
    <published-at type="datetime" nil="true"></published-at>
    <state>queued</state>
    <summary>CipherMail provides a safe alternative to the mail_to helper by hiding mailto links from e-mail harvesting bots. The generated output is completely obfuscated by a 1024 bit random key.</summary>
    <title>Rails Plugin CipherMail (Backup Archive from svn)</title>
    <updated-at type="datetime">2008-06-02T11:02:17+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content>&lt;p&gt;If you want to know how your database schema looks like, you have three options: connect to your database and do it with &lt;em&gt;&lt;span class=&quot;caps&quot;&gt;DESCRIBE&lt;/span&gt; table&lt;/em&gt;, check the file &lt;em&gt;db/schema.rb&lt;/em&gt; or use the &lt;strong&gt;annotate_models&lt;/strong&gt; plugin:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
script/plugin install http://repo.pragprog.com/svn/Public/plugins/annotate_models
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Now you just have to run the new rake task &lt;strong&gt;annotate_models&lt;/strong&gt;:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
rake annotate_models
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Open one of your model files and you&amp;#8217;ll see a new comment block that looks like this:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
# == Schema Information
# Schema version: 53
#
# Table name: vendors
#
#  id         :integer(11)     not null, primary key
#  vclass     :string(255)
#  name       :string(255)
#  vid        :integer(11)
#  created_at :datetime
#  updated_at :datetime
#  creator_id :integer(11)
#  updater_id :integer(11)
#
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;You should run the rake task every time you do a migration to keep the annotation up-to-date. It&amp;#8217;s trivial but very helpful. I couldn&amp;#8217;t live without this plugin.&lt;/p&gt;


	&lt;p&gt;For more Rails tricks, &lt;a href=&quot;http://howflow.com/tags/rails&quot;&gt;click here&lt;/a&gt;&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>p. If you want to know how your database schema looks like, you have three options: connect to your database and do it with _DESCRIBE table_, check the file _db/schema.rb_ or use the *annotate_models* plugin:


&lt;pre&gt;
&lt;code&gt;
script/plugin install http://repo.pragprog.com/svn/Public/plugins/annotate_models
&lt;/code&gt;
&lt;/pre&gt;


p. Now you just have to run the new rake task *annotate_models*:


&lt;pre&gt;
&lt;code&gt;
rake annotate_models
&lt;/code&gt;
&lt;/pre&gt;


p. Open one of your model files and you'll see a new comment block that looks like this:


&lt;pre&gt;
&lt;code&gt;
# == Schema Information
# Schema version: 53
#
# Table name: vendors
#
#  id         :integer(11)     not null, primary key
#  vclass     :string(255)
#  name       :string(255)
#  vid        :integer(11)
#  created_at :datetime
#  updated_at :datetime
#  creator_id :integer(11)
#  updater_id :integer(11)
#
&lt;/code&gt;
&lt;/pre&gt;


p. You should run the rake task every time you do a migration to keep the annotation up-to-date. It's trivial but very helpful. I couldn't live without this plugin.


p. For more Rails tricks, &quot;click here&quot;:http://howflow.com/tags/rails</content-textile>
    <created-at type="datetime">2008-05-25T13:23:06+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">197</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>annotate_your_models</permalink>
    <published-at type="datetime">2008-05-25T17:34:17+02:00</published-at>
    <state>published</state>
    <summary>This is actually a very old trick, because annotate_models is one of the older Rails plugins. On the other hand, I realized that only a few people have heard of it.</summary>
    <title>Annotate Your Models</title>
    <updated-at type="datetime">2008-05-25T19:34:19+02:00</updated-at>
    <updater-id type="integer">8</updater-id>
    <url>http://pragdave.pragprog.com/pragdave/2006/02/annotate_models.html</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer">#&lt;Comment:0x2b3b71dc8390&gt;#&lt;Comment:0x2b3b71dc7c38&gt;</comments>
    <content>&lt;p&gt;Example usage, just to give you an idea how it works:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
class Artist &amp;lt; ActiveRecord::Base
  acts_as_soft_deletable # This will wrap the destroy method to provide soft delete        
                         # support and create a new ActiveRecord class called Artist::Deleted
end

model = Artist.find(34)
model.destroy   # removes row from artists table, and adds a row to
                # deleted_artists table

deleted = Artist::Deleted.find(34)
deleted.undestroy!  # adds the row back to the artists table, and removes
                    # if from the deleted_artists table

restored = Artist.find(34) # The artist is restored with all the same
                           # information. The updated_at column will be
                           # Time.now if it exists.
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Take a look at the &lt;span class=&quot;caps&quot;&gt;README&lt;/span&gt; to find out more. For more Rails Tricks, click &lt;a href=&quot;http://howflow.com/tags/rails&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>p. Example usage, just to give you an idea how it works:


&lt;pre&gt;
&lt;code&gt;
class Artist &lt; ActiveRecord::Base
  acts_as_soft_deletable # This will wrap the destroy method to provide soft delete        
                         # support and create a new ActiveRecord class called Artist::Deleted
end

model = Artist.find(34)
model.destroy   # removes row from artists table, and adds a row to
                # deleted_artists table

deleted = Artist::Deleted.find(34)
deleted.undestroy!  # adds the row back to the artists table, and removes
                    # if from the deleted_artists table

restored = Artist.find(34) # The artist is restored with all the same
                           # information. The updated_at column will be
                           # Time.now if it exists.
&lt;/code&gt;
&lt;/pre&gt;


p. Take a look at the README to find out more. For more Rails Tricks, click &quot;here&quot;:http://howflow.com/tags/rails</content-textile>
    <created-at type="datetime">2008-05-20T17:18:43+02:00</created-at>
    <creator-id type="integer">8</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">188</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">4</nvotes>
    <permalink>new_rails_plugin_acts_as_soft_deletable</permalink>
    <published-at type="datetime">2008-05-20T16:36:40+02:00</published-at>
    <state>published</state>
    <summary>Temporarily delete records from AR models: This plugin provides the ability to soft delete ActiveRecord models. When models are destroyed, they will be archived into a special deleted table. They can later be restored easily.</summary>
    <title>New Rails Plugin: acts_as_soft_deletable</title>
    <updated-at type="datetime">2008-05-22T02:36:21+02:00</updated-at>
    <updater-id type="integer">3</updater-id>
    <url>http://github.com/ajh/acts_as_soft_deletable/tree/master</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content>&lt;p&gt;At least in earlier versions of acts_as_taggable_redux it wasn&amp;#8217;t clearly stated that you have to call your controller &lt;strong&gt;tags_controller&lt;/strong&gt; and not &lt;strong&gt;tag_controller&lt;/strong&gt;. I&amp;#8217;m not sure if the documentation  has been updated in the meantime.&lt;/p&gt;


	&lt;p&gt;You also have to add this route to your routes.rb:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
map.resources :tags
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;This trick is just for the sake of completeness. For more rails tricks click &lt;a href=&quot;http://howflow.com/tags/14&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>p. At least in earlier versions of acts_as_taggable_redux it wasn't clearly stated that you have to call your controller *tags_controller* and not *tag_controller*. I'm not sure if the documentation  has been updated in the meantime.


p. You also have to add this route to your routes.rb:


&lt;pre&gt;
&lt;code&gt;
map.resources :tags
&lt;/code&gt;
&lt;/pre&gt;


p. This trick is just for the sake of completeness. For more rails tricks click &quot;here&quot;:http://howflow.com/tags/14</content-textile>
    <created-at type="datetime">2008-05-05T18:59:27+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">150</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">2</nvotes>
    <permalink>solution_for_uninitialized_constant_tagscontroller_acts_as_taggable_redux</permalink>
    <published-at type="datetime">2008-05-09T15:35:31+02:00</published-at>
    <state>published</state>
    <summary>This might be interesting if you get the error message &quot;uninitialized constant TagsController&quot; while using the acts_as_taggable_redux rails plugin.</summary>
    <title>Solution for 'uninitialized constant TagsController' (acts_as_ta</title>
    <updated-at type="datetime">2008-05-09T17:35:31+02:00</updated-at>
    <updater-id type="integer">8</updater-id>
    <url nil="true"></url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-05-05T17:06:37+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">149</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>exception_notifications</permalink>
    <published-at type="datetime">2008-05-05T21:30:01+02:00</published-at>
    <state>published</state>
    <summary>If you're running a production site, it's a good idea to record all exceptions which occur. See how to set up a notification system which does that in this episode. Yet another great railscast.</summary>
    <title>Exception Notifications</title>
    <updated-at type="datetime">2008-05-06T01:12:23+02:00</updated-at>
    <updater-id type="integer">8</updater-id>
    <url>http://railscasts.com/episodes/104</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content>&lt;h1&gt;Installation&lt;/h1&gt;


&lt;pre&gt;
&lt;code&gt;

  git clone git://github.com/steffen/ordered_attributes.git vendor/plugins/ordered_attributes

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;On Edge Rails:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  script/plugin install git://github.com/steffen/ordered_attributes.git

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h1&gt;Example&lt;/h1&gt;


&lt;pre&gt;
&lt;code&gt;

  class Person &amp;lt; ActiveRecord::Base

    attr_order :name, :street, :zip, :city

    attr_groups :address =&amp;gt; [:street, :zip, :city],
              :birth =&amp;gt; [:date_of_birth, :place_of_birth], // you can use %w(date_of_birth place_of_birth) as well
              :all =&amp;gt; [:name, :address, :birth]

  end

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Use the ordered_attributes method to get the ordered attributes:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  Person.ordered_attributes
  =&amp;gt; [:name, :street, :zip, :city]

  Person.ordered_attributes(:all)
  =&amp;gt; [:name, :street, :zip, :city, :date_of_birth, :place_of_birth]

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Please visit the linked website for more information.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h1. Installation

&lt;pre&gt;
&lt;code&gt;

  git clone git://github.com/steffen/ordered_attributes.git vendor/plugins/ordered_attributes

&lt;/code&gt;
&lt;/pre&gt;

p. On Edge Rails:


&lt;pre&gt;
&lt;code&gt;

  script/plugin install git://github.com/steffen/ordered_attributes.git

&lt;/code&gt;
&lt;/pre&gt;

h1. Example


&lt;pre&gt;
&lt;code&gt;

  class Person &lt; ActiveRecord::Base

    attr_order :name, :street, :zip, :city

    attr_groups :address =&gt; [:street, :zip, :city],
              :birth =&gt; [:date_of_birth, :place_of_birth], // you can use %w(date_of_birth place_of_birth) as well
              :all =&gt; [:name, :address, :birth]

  end

&lt;/code&gt;
&lt;/pre&gt;

p. Use the ordered_attributes method to get the ordered attributes:


&lt;pre&gt;
&lt;code&gt;

  Person.ordered_attributes
  =&gt; [:name, :street, :zip, :city]

  Person.ordered_attributes(:all)
  =&gt; [:name, :street, :zip, :city, :date_of_birth, :place_of_birth]

&lt;/code&gt;
&lt;/pre&gt;


p. Please visit the linked website for more information.</content-textile>
    <created-at type="datetime">2008-05-02T16:14:35+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">125</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">2</nvotes>
    <permalink>ordered_attributes_plugin</permalink>
    <published-at type="datetime">2008-05-02T20:58:35+02:00</published-at>
    <state>published</state>
    <summary>This Ruby on Rails plugin from Steffen Hiller provides an easy way to order ActiveRecord attributes for using them for csv exports or automated table generation.</summary>
    <title>Ordered Attributes Plugin</title>
    <updated-at type="datetime">2008-05-02T22:58:38+02:00</updated-at>
    <updater-id type="integer">8</updater-id>
    <url>http://www.extjswithrails.com/2008/04/ordered-attributes.html</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content>&lt;p&gt;Another beautiful and useful rails plugin from Sur Max.&lt;/p&gt;


	&lt;h1&gt;Introduction&lt;/h1&gt;


	&lt;p&gt;AutoTags is a rubyonrails plugin to automatically generate the relevant tags from the provided content. The tags further can automatically be pushed in database using the legacy acts_as_taggable plugin. The plugin is very useful for social networking site, communities sites and all those public sites where there is a scope of huge content. So, no more manually tagging all your content&amp;#8230; just a simple and slick solution.&lt;/p&gt;


	&lt;h1&gt;Installation&lt;/h1&gt;


&lt;pre&gt;
&lt;code&gt;

  ruby script/plugin install http://auto-tags.googlecode.com/svn/trunk/auto_tags

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h1&gt;Example&lt;/h1&gt;


	&lt;h2&gt;Model specific usage&lt;/h2&gt;


&lt;pre&gt;
&lt;code&gt;

  # single attribute example
  class Vendor &amp;lt; ActiveRecord::Base
    auto_tags :include =&amp;gt; :product
  end

  # multiple attributes example
  class Vendor &amp;lt; ActiveRecord::Base
    auto_tags :include =&amp;gt; [:product, :description]
  end

  # associations example
  class Book &amp;lt; ActiveRecord::Base
    has_many :authors
    auto_tags :include =&amp;gt; [:title, :description, :authors_names]

    def authors_names
      authors.collect{|a| a.name.join(' ')}
    end
  end

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Generic usage&lt;/h2&gt;


&lt;pre&gt;
&lt;code&gt;

  AutoTags::AutoTagsGeneration.generate_tags(content)

&lt;/code&gt;
&lt;/pre&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>Another beautiful and useful rails plugin from Sur Max.

h1. Introduction

p. AutoTags is a rubyonrails plugin to automatically generate the relevant tags from the provided content. The tags further can automatically be pushed in database using the legacy acts_as_taggable plugin. The plugin is very useful for social networking site, communities sites and all those public sites where there is a scope of huge content. So, no more manually tagging all your content... just a simple and slick solution.


h1. Installation

&lt;pre&gt;
&lt;code&gt;

  ruby script/plugin install http://auto-tags.googlecode.com/svn/trunk/auto_tags

&lt;/code&gt;
&lt;/pre&gt;


h1. Example

h2. Model specific usage

&lt;pre&gt;
&lt;code&gt;

  # single attribute example
  class Vendor &lt; ActiveRecord::Base
    auto_tags :include =&gt; :product
  end

  # multiple attributes example
  class Vendor &lt; ActiveRecord::Base
    auto_tags :include =&gt; [:product, :description]
  end

  # associations example
  class Book &lt; ActiveRecord::Base
    has_many :authors
    auto_tags :include =&gt; [:title, :description, :authors_names]
    
    def authors_names
      authors.collect{|a| a.name.join(' ')}
    end
  end

&lt;/code&gt;
&lt;/pre&gt;

h2. Generic usage

&lt;pre&gt;
&lt;code&gt;

  AutoTags::AutoTagsGeneration.generate_tags(content)

&lt;/code&gt;
&lt;/pre&gt;</content-textile>
    <created-at type="datetime">2008-04-30T16:36:46+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">117</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>new_rails_plugin_auto_tags_from_the_author_of_simple_captcha</permalink>
    <published-at type="datetime">2008-04-30T16:25:38+02:00</published-at>
    <state>published</state>
    <summary>AutoTags, is a plugin for RubyOnRails applications to automatically generate the relevant tags for the provided content by making use of the Yahoo term extraction api. Its quite simple to use and provide easy integration with ActiveRecord. The plugin is very useful for social applications, community websites and all those networking applications where there is a scope of user generate content to be tagged.</summary>
    <title>New Rails Plugin: Auto Tags - From the Author of Simple Captcha</title>
    <updated-at type="datetime">2008-05-01T18:55:01+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url>http://expressica.com/auto_tags</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">4</category-id>
    <comments type="integer"></comments>
    <content nil="true"></content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile nil="true"></content-textile>
    <created-at type="datetime">2008-04-29T10:16:33+02:00</created-at>
    <creator-id type="integer">10</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">107</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">3</nvotes>
    <permalink>firefox_using_java_as_a_plugin_on_gentoo</permalink>
    <published-at type="datetime">2008-04-29T12:05:15+02:00</published-at>
    <state>published</state>
    <summary>Adding Java-Support to Firefox on Gentoo needs only a few commands. This WIKI describes them</summary>
    <title>FireFox: using Java as a plugin on Gentoo</title>
    <updated-at type="datetime">2008-05-01T18:52:17+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url>http://gentoo-wiki.com/HOWTO_Java_and_Firefox</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content>&lt;h1&gt;Installation&lt;/h1&gt;


	&lt;p&gt;Install it into your Rails project via script/plugin:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  script/plugin install http://hasmanyrelated.rubyforge.org/svn/trunk/has_many_related

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h1&gt;Example&lt;/h1&gt;


	&lt;p&gt;Assuming you have a join table with columns user_id and friend_id:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  class User &amp;lt; ActiveRecord::Base
    has_many_related :friends, :foreign_key =&amp;gt; 'friend_id'
  end

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Let&amp;#8217;s create some users:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  jan = User.create
  marc = User.create

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Association is symmetric, so if Marc is Jan&amp;#8217;s friend, Jan is Marc&amp;#8217;s friend too:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;

  jan.friends &amp;lt;&amp;lt; marc
  marc.friends.include? jan # true

  marc.friends.clear
  jan.friends.include? marc # false

&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;This plugin as nifty as it is, is not as powerful as has_many_friends, but it is the perfect choice for many other applications.&lt;/p&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h1. Installation

p. Install it into your Rails project via script/plugin:

&lt;pre&gt;
&lt;code&gt;

  script/plugin install http://hasmanyrelated.rubyforge.org/svn/trunk/has_many_related

&lt;/code&gt;
&lt;/pre&gt;


h1. Example


p. Assuming you have a join table with columns user_id and friend_id:


&lt;pre&gt;
&lt;code&gt;

  class User &lt; ActiveRecord::Base
    has_many_related :friends, :foreign_key =&gt; 'friend_id'
  end

&lt;/code&gt;
&lt;/pre&gt;


p. Let's create some users:


&lt;pre&gt;
&lt;code&gt;

  jan = User.create
  marc = User.create

&lt;/code&gt;
&lt;/pre&gt;

p. Association is symmetric, so if Marc is Jan's friend, Jan is Marc's friend too:


&lt;pre&gt;
&lt;code&gt;

  jan.friends &lt;&lt; marc
  marc.friends.include? jan # true

  marc.friends.clear
  jan.friends.include? marc # false

&lt;/code&gt;
&lt;/pre&gt;


p. This plugin as nifty as it is, is not as powerful as has_many_friends, but it is the perfect choice for many other applications.</content-textile>
    <created-at type="datetime">2008-04-28T18:40:55+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">103</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">2</nvotes>
    <permalink>associate_a_class_with_itself</permalink>
    <published-at type="datetime">2008-04-29T00:55:49+02:00</published-at>
    <state>published</state>
    <summary>Has(AndBelongsTo)ManyRelated is Rails plugin that associates a class with itself via an intermediate join table, extending the original has_and_belongs_to_many with symmetric associations.</summary>
    <title>Associate a Class with Itself</title>
    <updated-at type="datetime">2008-05-01T19:04:33+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url>http://rubyforge.org/projects/hasmanyrelated/</url>
    <url-code nil="true"></url-code>
  </trick>
  <trick>
    <category-id type="integer">7</category-id>
    <comments type="integer"></comments>
    <content>&lt;h2&gt;This is how he did it:&lt;/h2&gt;


	&lt;h3&gt;Generators&lt;/h3&gt;


&lt;pre&gt;
&lt;code&gt;

  script/generate scaffold announcement message:text starts_at:datetime ends_at:datetime
  script/generate controller javascripts

&lt;/pre&gt;
&lt;/code&gt;

	&lt;h3&gt;View&lt;/h3&gt;


&lt;pre&gt;
&lt;code&gt;

  &amp;lt;!-- layouts/application.html.erb --&amp;gt;
  &amp;lt;% unless current_announcements.empty? %&amp;gt;
  &amp;lt;div id=&quot;announcement&quot;&amp;gt;
    &amp;lt;% for announcement in current_announcements %&amp;gt;
      &amp;lt;p&amp;gt;&amp;lt;%=h announcement.message %&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;% end %&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;%= link_to_remote &quot;Hide this message&quot;, :url =&amp;gt; &quot;/javascripts/hide_announcement.js&quot; %&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;% end %&amp;gt;

&lt;/pre&gt;
&lt;/code&gt;

	&lt;h3&gt;Model/Helper/Controller/RJS/Route&lt;/h3&gt;


&lt;pre&gt;
&lt;code&gt;

  # models/announcement.rb
  def self.current_announcements(hide_time)
    with_scope :find =&amp;gt; { :conditions =&amp;gt; &quot;starts_at &amp;lt;= now() AND ends_at &amp;gt;= now()&quot; } do
      if hide_time.nil?
        find(:all)
      else
        find(:all, :conditions =&amp;gt; [&quot;updated_at &amp;gt; ?&quot;, hide_time])
      end
    end
  end

  # application_helper.rb
  def current_announcements
    @current_announcements ||= Announcement.current_announcements(session[:announcement_hide_time])
  end

  # javascripts_controller.rb
  def hide_announcement
    session[:announcement_hide_time] = Time.now
  end

  # hide_announcement.js.rjs
  page[:announcement].hide

  # routes.rb
  map.connect &quot;:controller/:action.:format&quot; 

&lt;/pre&gt;
&lt;/code&gt;

	&lt;h2&gt;This is how you could do it&lt;/h2&gt;


	&lt;h3&gt;Plugin installation&lt;/h3&gt;


&lt;pre&gt;
&lt;code&gt;

  script/plugin install http://pmade.com/svn/oss/stickies/trunk

&lt;/pre&gt;
&lt;/code&gt;

	&lt;h3&gt;Somewhere in your application layout:&lt;/h3&gt;


&lt;pre&gt;
&lt;code&gt;

  &amp;lt;%= render_stickies %&amp;gt;

&lt;/pre&gt;
&lt;/code&gt;

	&lt;h3&gt;Application controller&lt;/h3&gt;


&lt;pre&gt;
&lt;code&gt;

  notice_stickie(&quot;This is an announcement!&quot;)

&lt;/pre&gt;
&lt;/code&gt;</content>
    <content-bbcode nil="true"></content-bbcode>
    <content-format>Textile</content-format>
    <content-html nil="true"></content-html>
    <content-textile>h2. This is how he did it:

h3. Generators

&lt;pre&gt;
&lt;code&gt;

  script/generate scaffold announcement message:text starts_at:datetime ends_at:datetime
  script/generate controller javascripts

&lt;/pre&gt;
&lt;/code&gt;

h3. View

&lt;pre&gt;
&lt;code&gt;

  &lt;!-- layouts/application.html.erb --&gt;
  &lt;% unless current_announcements.empty? %&gt;
  &lt;div id=&quot;announcement&quot;&gt;
    &lt;% for announcement in current_announcements %&gt;
      &lt;p&gt;&lt;%=h announcement.message %&gt;&lt;/p&gt;
    &lt;% end %&gt;
    &lt;p&gt;&lt;%= link_to_remote &quot;Hide this message&quot;, :url =&gt; &quot;/javascripts/hide_announcement.js&quot; %&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;% end %&gt;

&lt;/pre&gt;
&lt;/code&gt;

h3. Model/Helper/Controller/RJS/Route

&lt;pre&gt;
&lt;code&gt;

  # models/announcement.rb
  def self.current_announcements(hide_time)
    with_scope :find =&gt; { :conditions =&gt; &quot;starts_at &lt;= now() AND ends_at &gt;= now()&quot; } do
      if hide_time.nil?
        find(:all)
      else
        find(:all, :conditions =&gt; [&quot;updated_at &gt; ?&quot;, hide_time])
      end
    end
  end

  # application_helper.rb
  def current_announcements
    @current_announcements ||= Announcement.current_announcements(session[:announcement_hide_time])
  end

  # javascripts_controller.rb
  def hide_announcement
    session[:announcement_hide_time] = Time.now
  end

  # hide_announcement.js.rjs
  page[:announcement].hide

  # routes.rb
  map.connect &quot;:controller/:action.:format&quot;

&lt;/pre&gt;
&lt;/code&gt;

h2. This is how you could do it

h3. Plugin installation

&lt;pre&gt;
&lt;code&gt;

  script/plugin install http://pmade.com/svn/oss/stickies/trunk

&lt;/pre&gt;
&lt;/code&gt;

h3. Somewhere in your application layout:

&lt;pre&gt;
&lt;code&gt;

  &lt;%= render_stickies %&gt;

&lt;/pre&gt;
&lt;/code&gt;

h3. Application controller

&lt;pre&gt;
&lt;code&gt;

  notice_stickie(&quot;This is an announcement!&quot;)

&lt;/pre&gt;
&lt;/code&gt;</content-textile>
    <created-at type="datetime">2008-04-28T11:13:43+02:00</created-at>
    <creator-id type="integer">1</creator-id>
    <deleted-at type="datetime" nil="true"></deleted-at>
    <file nil="true"></file>
    <id type="integer">102</id>
    <lang-id type="integer" nil="true"></lang-id>
    <locale>en</locale>
    <nreports type="integer">0</nreports>
    <nvotes type="integer">4</nvotes>
    <permalink>site_wide_announcements</permalink>
    <published-at type="datetime">2008-04-28T09:15:59+02:00</published-at>
    <state>published</state>
    <summary>Sometimes you need to display an administrative announcement to every page on the site and give the users the ability to hide the announcement. See how in this episode. Yet another great railscast. Follow the link and make sure to have a look at our content page for an alternative way to do it.</summary>
    <title>Site Wide Announcements</title>
    <updated-at type="datetime">2008-05-01T19:04:03+02:00</updated-at>
    <updater-id type="integer">1</updater-id>
    <url>http://railscasts.com/episodes/103</url>
    <url-code nil="true"></url-code>
  </trick>
</tricks>
