<?xml version="1.0" encoding="UTF-8"?>
<posts type="array">
  <post>
    <body>As I've "previously mentioned":http://www.experimeme.net/rubyamf-currently-breaks-rspec-tests, RubyAMF gives you @render:amf@ so you can send controller responses as binary AMF streams to Flash / Flex applications (also known as Flash remoting).

Setting it up for rails is reasonably straightforward. You just need to @script/install http://rubyamf.googlecode.com/svn/trunk/rubyamf@ to install the plugin. If you're developing locally you'll want to restart your webserver, and then you should be able to browse to http://localhost:3000/rubyamf_gateway/ which will return an http response with a logo of RubyAMF.

Once that's done the class mappings need to be specified, so that (for instance) a Tag class in ActionScript returned by a client swf is automatically deserialised into the appropriate Tag class within the Rails application.

Over a few posts I'm going to demonstrate putting together a Flex-based tag cloud which uses RubyAMF, so the mapping (which is defined in @config/rubyamf_config.rb@) would be this:

&lt;code lang="ruby"&gt;
ClassMappings.register(:actionscript =&gt; 'Tag', :ruby =&gt; 'Tag', :type =&gt; 'active_record',
:attributes =&gt; ["id", "name", "count"])
&lt;/code&gt;

(There's plenty of examples in the config file along with other options worth looking at.)

Once that's defined you'll want to specify a controller method which returns your tag cloud data and also responds to AMF requests. As I "mentioned earlier":http://www.experimeme.net/adding-tagging I'm using "acts_as_taggable_on_steroids":http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids at the moment, and this plugin gives me a method which returns all tags and their counts, so the method (defined in my @posts_controller.rb@ file) is as simple as this:
&lt;code lang="ruby"&gt;
def tag_counts
	@tags = Post.tag_counts
	respond to do |format|
		format.html # If you'd like to do something in html
		format.amf { render:amf =&gt; @tags }
	end
end
&lt;/code&gt;

At this point you'll have an AMF gateway and a method which will return a complex datatype serialised as AMF. The next step is to build a Rich Client in Flex to consume this service.</body>
    <created-at type="datetime">2008-11-30T17:31:46Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">26</id>
    <permalink>setting-up-rubyamf-for-flash-and-flex</permalink>
    <title>Setting up RubyAMF for Flash and Flex</title>
    <updated-at type="datetime">2008-12-08T00:06:08Z</updated-at>
  </post>
  <post>
    <body>Mirroring your production db on your local machine is really quite useful, and this rake task, stored at @lib/tasks/synclocal.rake@ works a charm, thanks to "Craig Ambrose":http://blog.craigambrose.com/past/2007/4/17/a-rake-task-to-grab-data-from-your-production-site/ (with minor modifications)

&lt;code lang="ruby"&gt;
"Make local develoment site look like the live site" 
task :synclocal do
  host = 'www.example.com'
  path = '/path/to/rails/app/current'
  username = 'user'
  db_config = YAML.load_file('config/database.yml')
  system "ssh #{username}@#{host} \"mysqldump -u #{db_config['production']["username"]}
-p#{db_config['production']["password"] } -Q --add-drop-table -O add-locks=FALSE -O
lock-tables=FALSE --ignore-table=#{db_config['production']["database"]}.sessions
#{db_config['production']["database"]} &gt; ~/dump.sql\"" 
  system "rsync -az --progress #{username}@#{host}:~/dump.sql ./db/production_data.sql" 
  system "mysql -u #{db_config['development']["username"]}
-p#{db_config['development']["password"]} #{db_config['development']["database"]}
&lt; ./db/production_data.sql"
end
&lt;/code&gt;</body>
    <created-at type="datetime">2008-11-10T21:28:25Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">24</id>
    <permalink>a-rake-task-to-sync-your-local-db-with-live</permalink>
    <title>A Rake Task To Sync Your Local DB With Live</title>
    <updated-at type="datetime">2008-11-10T21:38:26Z</updated-at>
  </post>
  <post>
    <body>I've finally got around to adding tagging to my posts. I've gone with "acts_as_taggable_on_steroids":http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids which seems to do the job.

It seems the original acts_as_taggable was shoddy, and is now deprecated. I'm not sure if the 'on_steroids' version is much better and have no inclination to investigate right now. Apparently "acts_as_taggable_on":http://github.com/mbleigh/acts-as-taggable-on/tree/master is the one worth using, but I'll check that out when I have some more time to care.</body>
    <created-at type="datetime">2008-11-10T00:01:06Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">23</id>
    <permalink>adding-tagging</permalink>
    <title>Adding Tagging</title>
    <updated-at type="datetime">2010-01-16T11:42:06Z</updated-at>
  </post>
  <post>
    <body>Continuing on my agile approach to the weblog-that-will-never-be-finished, I noticed after three weeks I was starting to get hammered by spam. I was curious to find out how long it would take to discover a dormant blog with very few inbound links, not even a blip on Google's radar.

Now I know. About three weeks, and then one post in particular started getting serious amounts of spam - a few hundred comment posts in a few days.

After doing a quick Google around various CAPTCHA approaches in Rails, I stumbled across "acts_as_snook":http://github.com/rsl/acts_as_snook/tree/master. From the creator of RMagick comes a nice little class that uses a simple points system to mark comments as ham or spam, The idea was taken from Jonathan Snook's "own approach":http://snook.ca/archives/other/effective_blog_comment_spam_blocker, hence the name.

I just had to @script/plugin install git://github.com/rsl/acts_as_snook.git@, and update my models a little bit: I added a spam_status field in a migration for Comment, and ham_comments_count for Post, and specified @acts_as_snook@ in the Comment model class.

Then it was just a case of updating views to use comment.ham? and post.ham_comments_count. Will be interesting to see how effective it is considering there's already many solutions out there, including services like Akismet that have been doing this for quite some time. I'd prefer not to have to use a CAPTCHA if possible, they're a little annoying and increasingly difficult to complete!</body>
    <created-at type="datetime">2008-10-25T00:24:31Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">19</id>
    <permalink>dealing-with-spam-acts_as_snook</permalink>
    <title>Dealing With Spam: acts_as_snook</title>
    <updated-at type="datetime">2010-01-10T23:45:06Z</updated-at>
  </post>
  <post>
    <body>One of the nice things about rails 2 is the gem dependencies you can express in your environment.rb file:
&lt;code lang="ruby"&gt;
Rails::Initializer.run do |config|
  config.gem 'mislav-will_paginate', :version =&gt; '~&gt; 2.2.3', :lib =&gt; 'will_paginate', 
    :source =&gt; 'http://gems.github.com'
end
&lt;/code&gt;
By expressing dependencies within the application's environment file, you can then run @rake gems:install@ on a target machine and it will install all the required gems.

However, because I use Rspec in development, running any sort of rake command on my project folder on the server failed with @no such file to load -- spec/rake/spectask@. This is because the rakefile itself has a dependancy on rspec - a little problematic. On installing the rspec gem on my server, I was hit with a bunch of missing dependencies: @Could not find RubyGem diff-lcs (&gt;= 0)@, @Could not find RubyGem spicycode-rcov (&gt;= 0.8.1.3)@, @Could not find RubyGem syntax (&gt;= 0)@, and @Could not find RubyGem hoe (&gt;= 1.8.0)@. After installing these gems rake -T finally worked again. It seems this is all caused by the "wonky dependencies":http://merb.lighthouseapp.com/projects/7433/tickets/603-merb-gen-complains-about-spicycode-rcov of the latest Rspec. Not so much fun.</body>
    <created-at type="datetime">2008-10-21T21:11:47Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">18</id>
    <permalink>rspec-1-1-9-not-so-much-fun</permalink>
    <title>Rspec 1.1.9 Not So Much Fun</title>
    <updated-at type="datetime">2008-10-22T08:29:01Z</updated-at>
  </post>
  <post>
    <body>Wanting to deploy to multiple sites with Capistrano is nice and easy. Instructions are "here":http://weblog.jamisbuck.org/2007/7/23/capistrano-multistage, but all you need to do is @gem install capistrano-ext@, @require 'capistrano/ext/multistage'@ in your config/deploy.rb, and then create config/deploy/staging.rb, and config/deploy/production.rb and fill out the appropriate deployment information.

Then it's just a matter of typing @cap staging deploy@. Almost...too easy.</body>
    <created-at type="datetime">2008-10-21T20:53:18Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">17</id>
    <permalink>staging-with-capistrano</permalink>
    <title>Staging With Capistrano</title>
    <updated-at type="datetime">2008-10-22T08:29:20Z</updated-at>
  </post>
  <post>
    <body>Sticking to the simple, the human-readable, I popped in the date and used an inbuilt ActionView helper to show the date in terms of seconds, minutes, hours, days, months and years since it was posted.

This just involved placing the below in my view class: @&lt;%= distance_of_time_in_words_to_now post.created_at %&gt; ago@
</body>
    <created-at type="datetime">2008-10-04T23:22:18Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">14</id>
    <permalink>posts-now-with-time-since-posted</permalink>
    <title>Posts - Now With Time Since Posted!</title>
    <updated-at type="datetime">2008-10-04T23:22:18Z</updated-at>
  </post>
  <post>
    <body>Decided there's enough posts to bother with pagination now. Seems "will_paginate":http://github.com/mislav/will_paginate/tree/master is the preferred plugin to do this, so specified the gem in my @environment.rb@ like so:
&lt;code lang="ruby"&gt;
  config.gem 'mislav-will_paginate', :version =&gt; '~&gt; 2.3.4', :lib =&gt; 'will_paginate', 
    :source =&gt; 'http://gems.github.com'
&lt;/code&gt;
and followed the "README":http://github.com/mislav/will_paginate/tree/master/README.rdoc</body>
    <created-at type="datetime">2008-10-01T22:16:27Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">12</id>
    <permalink>pagination</permalink>
    <title>Pagination</title>
    <updated-at type="datetime">2008-10-01T22:16:27Z</updated-at>
  </post>
  <post>
    <body>I've added functionality so URLs are autocompleted if a partial URL fragment matches one post, and redirects to a (yet-to-be-completed) search page in any other case.

The autocompletion is nice in the event of a partial copy and paste, or if a URL happened to wrap and break in an email client. Searching posts via the address bar will be nice too.

Friendly, helpful. Now if only the sites I visited implemented something this simple and useful. There's really no excuse to throw up a 404 in these situations.

Still getting to grips with Rspec - writing lots more test code than production code, like the below:

&lt;code lang="actionscript"&gt;
  describe "responding to GET search" do
    
    it "should render post page" do
        Post.should_receive(:find_by_permalink).with("test-post").and_return(mock_post)
        get :search, :permalink =&gt; "test-post"
        response.should render_template("/posts/show.html.erb")
    end
    
    it "should redirect to post" do
        @post = mock_model(Post)
        @post.stub!(:permalink).and_return('test-post')
        @posts = Array.new
        @posts &lt;&lt; @post
        Post.should_receive(:find_by_permalink).with("test-post").and_return(nil)
        Post.should_receive(:find).
with(:all, :conditions =&gt; ["permalink like ?", "test-post%"]).
and_return(@posts)
        get :search, :permalink =&gt; "test-post"
        response.should redirect_to("/test-post")
    end
    
    it "should render search page" do
        @posts = Array.new
        @posts &lt;&lt; mock_model(Post) &lt;&lt; mock_model(Post)
        Post.should_receive(:find_by_permalink).with("test-posts").and_return(nil)
        Post.should_receive(:find).
with(:all, :conditions =&gt; ["permalink like ?", "test-posts%"]).
and_return(@posts)
        get :search, :permalink =&gt; "test-posts"
        response.should render_template("/posts/search.html.erb")
    end
  end
&lt;/code&gt;</body>
    <created-at type="datetime">2008-09-28T23:02:42Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">11</id>
    <permalink>friendly-helpful-urls</permalink>
    <title>Friendly, Helpful URLs</title>
    <updated-at type="datetime">2008-10-04T16:41:26Z</updated-at>
  </post>
  <post>
    <body>The next task I decided to knock over was implementing nice, tidy, shorter URLs. Permalink_fu's already solved the problem, and there's a simple run-through of this "right here":http://www.seoonrails.com/even-better-looking-urls-with-permalink_fu.

I debated whether to include the YYYY/MM/DD clutter into the URL and decided not to. I *do* like getting an indication of the year within URLs (particularly in search results on technical topics) but I also like seeing short urls that are hackable - I'm planing on auto-completing if only one result is returned, and returning to a search page if more than one result is returned, making this url strategy a little more user-friendly and intelligent.

The uniqueness issue this raises doesn't bother me - I like the fact I'll have to choose a different title for every post.</body>
    <created-at type="datetime">2008-09-24T23:13:13Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">10</id>
    <permalink>nice-n-tidy-urls</permalink>
    <title>Nice N Tidy URLs</title>
    <updated-at type="datetime">2009-04-30T22:12:49Z</updated-at>
  </post>
  <post>
    <body>A little view helper to use Ultraviolet would be nice, which is where "tm_syntax_highlighting":http://www.unboundimagination.com/Rails-Plugin:-TextMate-Syntax-Highlighting came in (incidentally it was while viewing that blog that I decided my URL strategy for posts will definitely not include dates within them).

I did @script/plugin install git://github.com/arya/tm_syntax_highlighting.git@, executed @script/generate syntax_css all@ to copy relevant css files for Uv, added a file at config/initializers/tm_syntax_highlighting_config.rb containing:
&lt;code lang="ruby"&gt;TmSyntaxHighlighting.defaults = {:theme =&gt; "twilight", :line_numbers =&gt; false}&lt;/code&gt;

and finally added the functions Arya wrote to my helpers/application_helper.rb file (obviously not with c0de as below, which is added merely so it doesn't get interpreted in this blog post):
&lt;code lang="ruby"&gt;   def prettify(text, options = {})
       text_pieces = text.split(/(&lt;c0de&gt;|&lt;c0de lang="[A-Za-z0-9_-]+"&gt;|
&lt;c0de lang='[A-Za-z0-9_-]+'&gt;|&lt;\/c0de&gt;)/)
       in_pre = false
       language = nil
       text_pieces.collect do |piece|
         if piece =~ /^&lt;c0de( lang=(["'])?(.*)\2)?&gt;$/
           language = $3
           in_pre = true
           nil
        elsif piece == "&lt;/c0de&gt;"
          in_pre = false
          language = nil
          nil
        elsif in_pre
          code(piece.strip, :lang =&gt; language)
        else
          markdown(piece, options)
        end
      end
    end
    
    def markdown(text, options = {})
      if options[:strip]
        RedCloth.new(strip_tags(text.strip)).to_html
      else
        RedCloth.new(text.strip).to_html
      end
    end&lt;/code&gt;</body>
    <created-at type="datetime">2008-09-22T23:37:36Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">9</id>
    <permalink>syntax-highlighting-2</permalink>
    <title>Syntax Highlighting #2</title>
    <updated-at type="datetime">2008-12-12T19:14:24Z</updated-at>
  </post>
  <post>
    <body>A brief survey of the syntax-highlighting land and I've initially settled on "Ultraviolet":http://ultraviolet.rubyforge.org/. Trying to install it as a gem met with Fail, and trying to compile the Oniguruma regexp library it depends on met with Fail as well. That was until I stumbled across "this post":http://snippets.aktagon.com/snippets/61-Installing-Ultraviolet-and-Oniguruma which mentioned a specific version of Oniguruma worked for him. So after i did @wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.8.0.tar.gz@, compiled, and installed, running the gem command for Ultraviolet succeeded!

The next task is to install the "tm_syntax_highlighting":http://github.com/arya/tm_syntax_highlighting/tree/master Rails plugin, and post my first code sample in all its syntax highlighting glory.</body>
    <created-at type="datetime">2008-09-21T22:44:57Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">8</id>
    <permalink>syntax-highlighting</permalink>
    <title>Syntax highlighting</title>
    <updated-at type="datetime">2008-09-24T22:57:51Z</updated-at>
  </post>
  <post>
    <body>Continuing to surprise myself, I've resisted the urge to 'learn RSpec testing later' and carried on. It's been a little difficult, as personal dev time seems so scarce, I want to get on with rolling my own blog, and RSpec has been a little frustrating.

That kind of frustration where you continually bang your head against the terminal, drift-net fish Google, and only come back with a few wet socks and a brittle frisbee.

Rspec'ing controllers which use authentication was one sticking point, partly because once you travel down a path that offers up various libraries and solutions you're reluctant to have to learn THAT and THAT as well! It was simpler than The Google had me believe though and a few posts mentioned I just needed to: before(:each) do
   @request.env["HTTP_AUTHORIZATION"] = "Basic " + Base64::encode64("user:password")
end

Another point of frustration was understanding how to test has_many relationships / nested resources, as my posts @has_many@ comments. Once I understood mocking and stubbing properly and looked at a few examples, including "Frustrations with RSpec":http://www.samgranieri.com/2008/2/24/frustrations-with-rspec I was finally able to modify my rspec scaffold code so all 60-odd tests passed.

It's almost time to start writing some working code - imagine that!</body>
    <created-at type="datetime">2008-09-21T21:00:42Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">7</id>
    <permalink>authentication-and-has_many-with-rspec</permalink>
    <title>Authentication and has_many With RSpec</title>
    <updated-at type="datetime">2008-10-04T16:42:09Z</updated-at>
  </post>
  <post>
    <body>After tidying up my scaffold-generated tests, everything passed on running @spec spec/@, so I was keen to investigate automating the running of tests.

After a bit of searching I thought I may as well investigate "PeepCode":http://peepcode.com/, so I went for PeepCode Unlimited and ran through "Rspec Basics":https://peepcode.com/products/rspec-basics. I hopped to @sudo gem install ZenTest@ and also ran @rake doc:plugins@ to generate documentation locally, which apparently includes more documentation than is available via the site.

One of the nice bits of information in the screencast was in using Growl with AutoTest. I had to install "Growl":http://growl.info/ first, and then install growlnotify from the extras folder of Growl. I also created an .autotest file in ~ with modified code "from here":http://blog.aisleten.com/2008/02/21/installing-growlnotify-and-autotest-for-bdd-use-with-rspec-on-leopard/. Then it was just a matter of running @autotest@ in the project root, but not before setting the @RSPEC=true@ "environment variable":http://blog.insoshi.com/2008/07/28/running-rails-tests-with-autotest-zentest-and-rspec/.</body>
    <created-at type="datetime">2008-09-17T20:38:12Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">6</id>
    <permalink>autotest-rspec</permalink>
    <title>AutoTest Rspec</title>
    <updated-at type="datetime">2008-11-19T20:35:54Z</updated-at>
  </post>
  <post>
    <body>With the power of @script/generate rspec_scaffold@ in hand I generated the test scaffold for my Post model. I also got clued up on using the "spec command":http://rspec.info/documentation/tools/spec.html to execute all the tests within a directory.

However as expected things didn't go so smoothly. When attempting to run spec I received the message "Your RSpec on Rails plugin is incompatible with your installed RSpec." I executed script/spec instead, which went a bit further but warned me about the MySQL library I was using, so I attempted to @sudo gem install mysql@ which spat out "ERROR:  Error installing mysql:
	ERROR: Failed to build gem native extension." So @sudo gem install mysql -- --with-mysql-config@ worked better, and then I just @rake db:test:clone@ to get the test db sorted.

Not being able to run spec bugged me, and a quick Google led me to a "very useful post":http://blog.insoshi.com/2008/07/03/a-rails-21-case-study-upgrading-the-insoshi-social-networking-platform/ which guided me through updating to the latest rspec plugin and gem. So now all the tests run, but with errors that seem to be fixable by modifying the default scaffold code to reflect how my classes are actually structured.</body>
    <created-at type="datetime">2008-09-16T22:46:39Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">5</id>
    <permalink>rspec-in-take-two</permalink>
    <title>Rspec'in Take Two</title>
    <updated-at type="datetime">2008-10-04T23:19:41Z</updated-at>
  </post>
  <post>
    <body>Reading through David Chelimsky's "introduction to Rspec":http://blog.davidchelimsky.net/articles/2007/05/14/an-introduction-to-rspec-part-i was a nice start to Rspec - I like the move to a more natural-language approach to writing tests for applications.

I went ahead and installed Rspec, @script/plugin install git://github.com/dchelimsky/rspec.git@, Rspec for Rails @script/plugin install git://github.com/dchelimsky/rspec-rails.git
@ and then generated the Rspec default files @script/generate rspec@.

However at that point I realised I understood Rspec at the conceptual level, but at the level of implementation within the context of a Rails app I was a little lost. Looking at the "official Rspec site":http://rspec.info/ I began to get a little frustrated at what I thought was the lack of documentation and real world examples - there's a bunch "here,":http://rspec.info/documentation/rails/ maybe I was just getting tired.

Anyway after getting side-tracked reading about Stories instead of Specs, I came back to David's original article and noticed one of his "comments":http://blog.davidchelimsky.net/articles/2007/05/14/an-introduction-to-rspec-part-i#comment-124 on his post mentioned executing @script/generate rspec script/generate rspec_scaffold Thing name:string@ to generate a bunch of examples. That was exactly what I needed as someone completely new to this, but I'll save more investigation for another day.

(I've only just noticed the site mentions Rspec generators "here":http://rspec.info/documentation/rails/generators.html - not sure I dig the nav bar going on there)</body>
    <created-at type="datetime">2008-09-15T22:05:33Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">4</id>
    <permalink>rspec-in-first-attempt-at-understanding-it</permalink>
    <title>Rspec'in - First Attempt At Understanding It</title>
    <updated-at type="datetime">2008-10-04T16:41:09Z</updated-at>
  </post>
  <post>
    <body>Well I thought before diving into unit testing I should sort out markup asap so I don't have to reformat past posts. A quick survey of the markup land and it seems the two popular candidates are "textile":http://hobix.com/textile/ and "markdown":http://daringfireball.net/projects/markdown/.

Textile seems perfectly adequate, so I hopped to installing "RedCloth":redcloth.org to provide textile support: @gem install RedCloth@. Once that was done I wasted a bit of time trying to work out the best way of implementing this in Rails. I could have used the ActionView TextHelper method "textilize":http://api.rubyonrails.com/classes/ActionView/Helpers/TextHelper.html#M001733 but sprinkling these method calls through view classes seemed a little silly.

After a bit of searching I came across "acts_as_textiled":http://errtheblog.com/posts/12-actsastextiled which seemed like the ticket. A quick @script/plugin install svn://errtheblog.com/svn/plugins/acts_as_textiled@, the addition of one line to my Post model class: @acts_as_textiled :body@ and ensuring the text wasn't escaped in the views - job done.</body>
    <created-at type="datetime">2008-09-14T21:52:00Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">3</id>
    <permalink>markup</permalink>
    <title>Markup</title>
    <updated-at type="datetime">2009-04-25T09:36:17Z</updated-at>
  </post>
  <post>
    <body>I should mention I ran through "this":http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial decent little Rails 2.0 blog tutorial to get to this point. A good start indeed.

However I noticed "netvibes":http://www.netvibes.com couldn't find any feeds for my blog. To sort this out I just needed to add a link to my atom feed in my layouts file: @&lt;link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="http://www.experimeme.net/feed/atom/" /&gt;@ and add the appropriate route to routes.rb: @map.connect 'feed/atom/', :controller =&gt; 'posts', :format =&gt; 'atom'@

The Rails team have selected atom as their feed format of choice, and reading through the wikipedia article on atom it seems to be a sensible choice over RSS: support for indicating type of content and internationalisation among other things.

I should probably look at markup support in posts soon, maybe after investigating unit testing with RSpec.</body>
    <created-at type="datetime">2008-09-14T17:08:29Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">2</id>
    <permalink>i-can-has-feeds</permalink>
    <title>I Can Has Feeds</title>
    <updated-at type="datetime">2010-01-03T09:25:11Z</updated-at>
  </post>
  <post>
    <body>Over a year and half and I still hadn't put together my hand-crafted, Ruby on Rails blog. It was meant to be an exercise in learning another framework and an opportunity to keep in touch with the 'real' web (as opposed to the Flash development I'm used to). I'd initially started one based on CakePHP but had always intended to switch to Rails.

I've figured there's no point in dragging my feet, so I may as well kick-start a rudimentary site that can evolve in fits and starts over time. Tags? Not yet. Markup? On the todo list.

Along the way I figure I can initially use the blog as a diary of development. Well, I should probably get started, there's lots to do.</body>
    <created-at type="datetime">2008-09-14T15:22:08Z</created-at>
    <ham-comments-count type="integer">0</ham-comments-count>
    <id type="integer">1</id>
    <permalink>first-post</permalink>
    <title>First Post</title>
    <updated-at type="datetime">2008-12-25T08:13:15Z</updated-at>
  </post>
</posts>
