<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Hardcore Forking Action</title>
    <link>http://hardcoreforkingaction.com/feed.rss/</link>
    <language>nl-BE</language>
    <ttl>40</ttl>
    <description>RSS feed from Jomz' blog about Radiant and other webdevelopment-related stuff.</description>
    
        <item>
          <title>Thinking Sphinx? Watch your scopes!</title>
          <description>&lt;p&gt;
  I ran into this little GOTCHA, and thought it could use some more Google love, so here goes:
&lt;/p&gt;&lt;p&gt;If you try to use named scopes with your Sphinx search, they will just be ignored. For example, I had a model JobOffer with this scope:
&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;scope :open, { :conditions =&amp;gt; 'job_offers.status = &quot;open&quot; OR job_offers.status = &quot;&quot;' }&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;
  And then did a search like this:
&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;@job_offers = JobOffer.open.search query&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which, to my surprise was also showing &quot;closed&quot; job offers.&lt;/p&gt;
&lt;p&gt;I found the solution &lt;a href=&quot;http://freelancing-god.github.com/ts/en/scopes.html&quot;&gt;over here&lt;/a&gt;; Sphinx has (since version 1.2) it's own form of scopes.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;sphinx_scope(:open){ 
  { :conditions =&gt; {:status =&gt; ['open', '']}}
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With that sphinx_scope in place, the above search call wìll work as expected. (well, obviously I've had to rename it to not clash with the existing Rails scope.)&lt;/p&gt;</description>
          <pubDate>Fri, 20 Aug 2010 00:00:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2010/08/20/thinking-sphinx-watch-your-scopes/</guid>
          <link> http://hardcoreforkingaction.com/blog/2010/08/20/thinking-sphinx-watch-your-scopes/</link>
        </item>
    
        <item>
          <title>ArrrrCamp presentation online</title>
          <description>&lt;p&gt;
  Better late than never right..; I've just uploaded my presentation on Radiant
  for the third edition of &lt;a href=&quot;http://arrrrcamp.be/&quot; title=&quot;About Ruby, Rails, Radiant and Rum&quot;&gt;ArrrrCamp&lt;/a&gt;:
&lt;/p&gt;
&lt;div style=&quot;width:450px&quot; id=&quot;__ss_4202068&quot;&gt;&lt;strong style=&quot;display:block;margin:12px 0 4px&quot;&gt;&lt;a href=&quot;http://www.slideshare.net/jomz83/getting-the-most-out-of-radiant&quot; title=&quot;Getting the most out of Radiant&quot;&gt;Getting the most out of Radiant&lt;/a&gt;&lt;/strong&gt;&lt;object id=&quot;__sse4202068&quot; width=&quot;450&quot; height=&quot;376&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=arrrrradiant-100521080959-phpapp02&amp;stripped_title=getting-the-most-out-of-radiant&quot; /&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;/&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;/&gt;&lt;embed name=&quot;__sse4202068&quot; src=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=arrrrradiant-100521080959-phpapp02&amp;stripped_title=getting-the-most-out-of-radiant&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;450&quot; height=&quot;376&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;</description>
          <pubDate>Fri, 21 May 2010 00:00:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2010/05/21/arrrrcamp-presentation-online/</guid>
          <link> http://hardcoreforkingaction.com/blog/2010/05/21/arrrrcamp-presentation-online/</link>
        </item>
    
        <item>
          <title>Radiant AdminUI gotcha</title>
          <description>&lt;p&gt;
  If you are working on a Radiant extension and, trying to use the render_region
  method, you encounter a NoMethodError like this:
&lt;/p&gt;
&lt;pre&gt;&lt;code lang=&quot;ruby&quot;&gt;undefined method `foo' for #&amp;lt;Radiant::AdminUI:0x3dacdf4&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Then this is what you are hitting:
&lt;/p&gt;
&lt;p&gt;
  &lt;a href=&quot;http://groups.google.com/group/radiantcms-dev/browse_thread/thread/d6fc1d385e17ae5f/cbe2ff5f4846c31f?#cbe2ff5f4846c31f&quot;&gt;http://groups.google.com/group/radiantcms-dev/browse_thread/thread/d6fc1d385e17ae5f/cbe2ff5f4846c31f?#cbe2ff5f4846c31f&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  It took me a while to find this out, so:
  &lt;strong&gt;you should only use the
  &lt;code&gt;render_region&lt;/code&gt;
  method when you want to make it possible for other extensions to inject
  new content in your views&lt;/strong&gt;. This makes sense for extensions like the
  &lt;a href=&quot;http://github.com/saturnflyer/radiant-dashboard-extension/&quot;&gt;dashboard&lt;/a&gt;&amp;#160;extension, but in most cases you do not need this functionality.
&lt;/p&gt;
&lt;p&gt;
  If you do want to be able to use region sets, you need to extend Radiant::AdminUI
  like so:
&lt;/p&gt;
&lt;p&gt;
  &lt;a href=&quot;http://github.com/saturnflyer/radiant-dashboard-extension/blob/4ac14f23d5ed7f518e442121b26172008b0e0a52/dashboard_extension.rb#L44-L55&quot;&gt;http://github.com/saturnflyer/radiant-dashboard-extension/blob/4ac14f23d5ed7f518e442121b26172008b0e0a52/dashboard_extension.rb#L44-L55&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  Another way to do it can be found in the paperclipped extension:
&lt;/p&gt;
&lt;p&gt;
  &lt;a href=&quot;http://github.com/kbingman/paperclipped/blob/master/lib/assets_admin_ui.rb&quot;&gt;http://github.com/kbingman/paperclipped/blob/master/lib/assets_admin_ui.rb&lt;/a&gt;&amp;#160;and
&lt;/p&gt;
&lt;p&gt;
  &lt;a href=&quot;http://github.com/kbingman/paperclipped/blob/cf86170b2960dcc80aca9b3f89e12e688a3cd007/paperclipped_extension.rb#L31-L32&quot;&gt;http://github.com/kbingman/paperclipped/blob/cf86170b2960dcc80aca9b3f89e12e688a3cd007/paperclipped_extension.rb#L31-L32&lt;/a&gt;
&lt;/p&gt;</description>
          <pubDate>Tue, 04 May 2010 10:32:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2010/05/04/radiant-adminui-gotcha/</guid>
          <link> http://hardcoreforkingaction.com/blog/2010/05/04/radiant-adminui-gotcha/</link>
        </item>
    
        <item>
          <title>Neat hack to &lt;r:gallery&gt;</title>
          <description>&lt;p&gt;
  I just made a little tweak to the gallery_tags.rb from the Gallery Extension.
&lt;/p&gt;
&lt;p&gt;
  It makes it easy to show a gallery somewhere on any page, if that page
  has a base gallery set. You can also hide a potential surrounding div if
  it is not needed (not containing a gallery). For example:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;r:gallery fail_silently=&quot;true&quot;&amp;gt;&amp;lt;div id=&quot;gallery&quot;&amp;gt;
  &amp;lt;r:gallery:lightbox /&amp;gt;
&amp;lt;/div&amp;gt;&amp;lt;/r:gallery&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Without the hack, (and the fail_silently attribute) you would get a nasty &quot;undefined method `items' for
  nil:NilClass&quot; if there was no base gallery set on that page. 
  Of course, it would also work if you are specifying a gallery by name
  or id, instead of relying on a base gallery being set.&amp;#160;
&lt;/p&gt;
&lt;p&gt;
  And all it took was;
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tag &quot;gallery&quot; do |tag| tag.locals.gallery = find_gallery(tag)
- tag.expand
+ tag.expand unless tag.locals.gallery.nil? &amp;amp;&amp;amp; tag.attr['fail_silently']
end&lt;/code&gt;&lt;/pre&gt;</description>
          <pubDate>Thu, 08 Oct 2009 20:11:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2009/10/08/neat-hack-to-r-gallery/</guid>
          <link> http://hardcoreforkingaction.com/blog/2009/10/08/neat-hack-to-r-gallery/</link>
        </item>
    
        <item>
          <title>Auto-prepending links in RSS feeds with your domain (on Radiant)</title>
          <description>&lt;p&gt;
  When you syndicate Radiant content, you may hit the problem of internal
  links, or img src attributes pointing to invalid paths on a syndicator's
  domain. So, for example, an aggregator may link to http://aggregator.com/about-us
  instead of http://your-site.com/about-us. The simple fix is ofcourse to
  use absolute URLs for all your href and src attributes, but that is not
  default behavior in Radiant (or most CMSes as far as i know).
&lt;/p&gt;
&lt;p&gt;
  If you are using paperclipped, and use &amp;lt;r:asset /&amp;gt; tags to display
  images, you could fix their src attributes in script console or via the
  Settings extension by doing:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Radiant::Config[&quot;assets.url&quot;] = &quot;http://your-site.com/:class/:id/:basename:no_original_style.:extension&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  But that still leaves you with the fact that &amp;lt;r:url /&amp;gt;, &amp;lt;r:link
  /&amp;gt; and some other radius tags output relative urls. Heck, you may even
  have a few clients that are smart enough to write urls by hand! Here's
  a method that will convert all relative URLs to absolute ones;
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def fix_for_syndication(text, host) &amp;#160; text.gsub(/href=('|&quot;)([^(http:|mailto:)].*?)('|&quot;)/,
    'href=&quot;' + host + '\2&quot;').gsub(/src=('|&quot;)([^http:].*?)('|&quot;)/, 'src=&quot;' +
    host + '\2&quot;') end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  From there you can make a simple radius tag to use where-ever you output
  stuff to an RSS feed;
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tag 'fix_links_for_syndication' do |tag| &amp;#160; fix_for_syndication(tag.expand,
    &quot;#{tag.globals.page.request.protocol}#{tag.globals.page.request.host_with_port}&quot;)
    end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  I used this in
  &lt;a href=&quot;http://github.com/jomz/radiant-gorilla-blog-extension/commit/2289bff8abf873fa2ff95081492a6f05d8413a19&quot;&gt;one of our own extensions&lt;/a&gt; (works-for-us'ish), use at your own risk;
  probably not compatible with the standard 'blog' extension for example.
&lt;/p&gt;</description>
          <pubDate>Fri, 11 Sep 2009 16:13:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2009/09/11/auto-prepending-links-in-rss-feeds-with-your-domain-on-radiant/</guid>
          <link> http://hardcoreforkingaction.com/blog/2009/09/11/auto-prepending-links-in-rss-feeds-with-your-domain-on-radiant/</link>
        </item>
    
        <item>
          <title>Fixing sIFR 3 + IE 8 "XXX" issue</title>
          <description>&lt;p&gt;
  We only recently discovered the bug in older sIFR versions where, on IE
  8, the first of your sifr'd elements would show 3 x's, and the rest would
  not be sifr'd at all. Though it's probably cleaner to
  &lt;a href=&quot;http://novemberborn.net/sifr3&quot;&gt;update sIFR&lt;/a&gt;, or even use
  &lt;a href=&quot;http://wiki.github.com/sorccu/cufon/about&quot;&gt;Cufon&lt;/a&gt; instead, here's a quick fix:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot;/&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  Just put that meta tag between your &amp;lt;head&amp;gt; tags, and the problem
  is solved.
&lt;/p&gt;</description>
          <pubDate>Wed, 09 Sep 2009 11:19:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2009/09/09/fixing-sifr-3-ie-8-xxx-issue/</guid>
          <link> http://hardcoreforkingaction.com/blog/2009/09/09/fixing-sifr-3-ie-8-xxx-issue/</link>
        </item>
    
        <item>
          <title>Terminal goodies for Radiant</title>
          <description>&lt;p&gt;
  If you have a lot of Radiant instances to manage and update, you probably do a lot of repetitive stuff in your terminal.
  I made some bash functions that I'm sure other people would find usefull too, so here goes:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;alias gus='git_update_extension'
alias gusom='git_update_extension_from_origin_master'
alias gusa='git_update_all_extensions'

function git_update_extension {	
  cd vendor/extensions/$1;
  git pull $2 $3;
  cd -;
  git add vendor/extensions/$1;
}
	
function git_update_extension_from_origin_master {
  cd vendor/extensions/$1;
  git pull origin master;
  cd -;
  git add vendor/extensions/$1;
}
# git update all extensions
function git_update_all_extensions {
  for dir in `ls vendor/extensions/`;
    do echo &quot;*** Updating $dir&quot;;
    gusom $dir origin master;
  done;
  rake radiant:extensions:update_all;
  undo_gorillafy;
}

function undo_gorillafy { # undo overwrites of sensitive files by gorillafy's update task
  git co public/stylesheets/extensions/gallery/lightbox.css;
  git co public/stylesheets/forms.css;
  git co public/stylesheets/grid.css;
  git co public/stylesheets/ie.css;
  git co public/stylesheets/stylesheet.css;
  git co public/javascripts/extensions/wym_editor_filter/radiant.wymeditor.js;
  git co public/images/body-bg.gif;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  If you don't know where to put this,
  &lt;em&gt;~/.bash_profile&lt;/em&gt; is a good idea, assuming you're using the standard Mac OS X terminal.
&lt;/p&gt;
&lt;p&gt;
  Now, from your &lt;em&gt;RADIANT_ROOT&lt;/em&gt;, you could update the comments extension like this:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MBPjomz:belmodo bennydegezelle$ gus comments
remote: Counting objects: 400, done.
remote: Compressing objects: 100% (149/149), done.
remote: Total 338 (delta 177), reused 338 (delta 177)
Receiving objects: 100% (338/338), 49.60 KiB, done.
Resolving deltas: 100% (177/177), completed with 21 local objects.
From git@github.com:jomz/radiant-comments
   e7f3bcb..0b7469d  master     -&gt; origin/master
Updating e7f3bcb..0b7469d
Fast forward
 README.rdoc                                        |   10 +-
 app/controllers/admin/comments_controller.rb       |   74 ++++++----
 app/controllers/comments_controller.rb             |    4 +-
 app/helpers/admin/comments_helper.rb               |    7 +
 app/models/akismet_spam_filter.rb                  |   37 +++++
 app/models/comment.rb                              |  155 ++++++--------------
 app/models/mollom_spam_filter.rb                   |   52 +++++++
 app/models/simple_spam_filter.rb                   |   38 +++++
 app/models/spam_filter.rb                          |   43 ++++++
 app/views/admin/comments/_comment.rhtml            |   58 ++++----
 app/views/admin/comments/_form.rhtml               |   78 +++++------
 app/views/admin/comments/edit.rhtml                |    4 +-
 app/views/admin/comments/index.rhtml               |   69 +++++----
 app/views/admin/pages/_index_view_comments.rhtml   |    4 +-
 comments_extension.rb                              |   65 ++++-----
 db/migrate/002_create_snippets.rb                  |    4 +-
 lib/comment_page_extensions.rb                     |   41 +++++
 lib/comment_tags.rb                                |   28 +++-
 lib/mollom.rb                                      |   18 +-
 lib/tasks/comments_extension_tasks.rake            |   48 ++++++-
 public/images/admin/comment_edit.png               |  Bin 0 -&gt; 644 bytes
 public/images/admin/comments.png                   |  Bin 0 -&gt; 557 bytes
 public/images/admin/comments_delete.png            |  Bin 0 -&gt; 670 bytes
 public/images/admin/delete.png                     |  Bin 0 -&gt; 715 bytes
 public/images/admin/email.png                      |  Bin 0 -&gt; 641 bytes
 public/images/admin/error.png                      |  Bin 0 -&gt; 666 bytes
 public/images/admin/link.png                       |  Bin 0 -&gt; 343 bytes
 public/images/admin/page_white_edit.png            |  Bin 0 -&gt; 618 bytes
 public/images/admin/table_save.png                 |  Bin 0 -&gt; 723 bytes
 public/images/admin/tick.png                       |  Bin 0 -&gt; 537 bytes
 public/stylesheets/admin/comments.css              |   41 +++++
 spec/controllers/admin/comments_controller_spec.rb |    4 +-
 spec/controllers/admin/comments_routing_spec.rb    |   43 ++++++
 spec/controllers/page_postback_spec.rb             |   51 +++++++
 spec/models/akismet_spam_filter_spec.rb            |   61 ++++++++
 spec/models/comment_spec.rb                        |  138 ++++++------------
 spec/models/comment_tags_spec.rb                   |   44 ++++++-
 spec/models/mollom_spam_filter_spec.rb             |  103 +++++++++++++
 spec/models/simple_spam_filter_spec.rb             |   44 ++++++
 spec/models/spam_filter_spec.rb                    |   38 +++++
 40 files changed, 1008 insertions(+), 396 deletions(-)
 create mode 100644 app/helpers/admin/comments_helper.rb
 create mode 100644 app/models/akismet_spam_filter.rb
 create mode 100644 app/models/mollom_spam_filter.rb
 create mode 100644 app/models/simple_spam_filter.rb
 create mode 100644 app/models/spam_filter.rb
 create mode 100644 lib/comment_page_extensions.rb
 create mode 100644 public/images/admin/comment_edit.png
 create mode 100644 public/images/admin/comments.png
 create mode 100644 public/images/admin/comments_delete.png
 create mode 100644 public/images/admin/delete.png
 create mode 100644 public/images/admin/email.png
 create mode 100644 public/images/admin/error.png
 create mode 100644 public/images/admin/link.png
 create mode 100644 public/images/admin/page_white_edit.png
 create mode 100644 public/images/admin/table_save.png
 create mode 100644 public/images/admin/tick.png
 create mode 100644 public/stylesheets/admin/comments.css
 create mode 100644 spec/controllers/admin/comments_routing_spec.rb
 create mode 100644 spec/controllers/page_postback_spec.rb
 create mode 100644 spec/models/akismet_spam_filter_spec.rb
 create mode 100644 spec/models/mollom_spam_filter_spec.rb
 create mode 100644 spec/models/simple_spam_filter_spec.rb
 create mode 100644 spec/models/spam_filter_spec.rb
/Users/bennydegezelle/rails/belmodo
MBPjomz:belmodo bennydegezelle$ git status
# On branch master
# Changes to be committed:
#   (use &quot;git reset HEAD &lt;file&gt;...&quot; to unstage)
#
#	modified:   vendor/extensions/comments
#
MBPjomz:belmodo bennydegezelle$&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  As you can see, the extension is updated, and this update staged and ready
  to commit. You can also specify which remote and branch you want to pull
  from, as you would with a normal
  &lt;em&gt;git pull&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
  More interesting is the '&lt;em&gt;git_update_all_extensions&lt;/em&gt;' or '&lt;em&gt;gusa&lt;/em&gt;' function. This will go over all your extensions and try to
  pull from origin master, and then run
  &lt;em&gt;rake radiant:extensions:update_all&lt;/em&gt;. Which, as you probably know,
  copies all public assets per extension.
&lt;/p&gt;
&lt;p&gt;
  The '&lt;em&gt;undo_gorillafy&lt;/em&gt;' function lastly, is something i run after the update_all
  task, because our Gorillafy extension copies default CSS files that we
  start each project with. These are public-facing files that are changed
  from time to time, so we don't want to ruin a site's looks by resetting
  it's CSS to our (new) defaults.
&lt;/p&gt;
&lt;p&gt;
  Use these functions as are, or tweak them to match your own
  workflow. Any improvements or remarks appreciated in the comments.
&lt;/p&gt;</description>
          <pubDate>Tue, 01 Sep 2009 00:05:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2009/09/01/terminal-goodies-for-radiant/</guid>
          <link> http://hardcoreforkingaction.com/blog/2009/09/01/terminal-goodies-for-radiant/</link>
        </item>
    
        <item>
          <title>Post in time</title>
          <description>&lt;p&gt;
  One of our beloved clients,
  &lt;a title=&quot;Belmodo.tv, an all-fashion and lifestyle news site&quot; href=&quot;http://belmodo.tv&quot;&gt;belmodo.tv&lt;/a&gt;, needed a way to publish new articles with delay. They can now use the
  default datetime_select controls for the page's published_at timestamp
  to do this. You can grab this tiny extension at
  &lt;a href=&quot;http://github.com/jomz/radiant-future-publishing-extension/tree/master&quot;&gt;github.com/jomz/radiant-future-publishing-extension&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  From the README:
&lt;/p&gt;
&lt;h2&gt;
  Usage
&lt;/h2&gt;
&lt;p&gt;
  Use the default published_at datetime_select controls to pick the date
  that you want to publish a page. If you haven't done so allready, you will
  have to set a config option through the settings extension or console.
  Namely:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Radiant::Config['page.edit.published_date?'] = true&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Warning&lt;/h2&gt;
&lt;p&gt;In order for this extension to work properly, you will have to set the
  correct timezone in your environment.rb. Not doing so will probably result
  in bad Time comparing..&lt;br /&gt;
  To do this, put this inside your Radiant::Initializer block:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;config.time_zone = &quot;Brussels&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can run this rake task to find out your timezone:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rake time:zones:local&lt;/code&gt;&lt;/pre&gt;</description>
          <pubDate>Tue, 02 Jun 2009 13:01:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2009/06/02/post-in-time/</guid>
          <link> http://hardcoreforkingaction.com/blog/2009/06/02/post-in-time/</link>
        </item>
    
        <item>
          <title>Weird wrong number of arguments error</title>
          <description>&lt;p&gt;
  Note to (self|google): when you encounter this error again:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;wrong number of arguments (1 for 0)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
  And the framework trace doesn't give any clue on where this happens, look
  for reserved words as controller method names. I had a 'send' action in
  my controller, and renaming it to send_feedback fixed it for me.
&lt;/p&gt;
&lt;p&gt;
  I'm not sure which other words are forbidden for controller names,
  but you can check this page on the Rails wiki if you're not sure about
  one:
  &lt;a href=&quot;http://wiki.rubyonrails.org/rails/pages/ReservedWords&quot;&gt;http://wiki.rubyonrails.org/rails/pages/ReservedWords&lt;/a&gt;
&lt;/p&gt;</description>
          <pubDate>Thu, 21 May 2009 08:47:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2009/05/21/weird-wrong-number-of-arguments-error/</guid>
          <link> http://hardcoreforkingaction.com/blog/2009/05/21/weird-wrong-number-of-arguments-error/</link>
        </item>
    
        <item>
          <title>Radiant kickstart script</title>
          <description>&lt;p&gt;Creating new Radiant instances can become tiresome after a while, especially when you use a lot of the same extensions all the time. &lt;a href=&quot;http://johnmuhl.com/&quot;&gt;John Muhl&lt;/a&gt;'s &lt;a href=&quot;http://github.com/johnmuhl/radiant-ray-extension/tree/master&quot;&gt;Ray extension&lt;/a&gt; can get you a long way for that, but there's still a lot of typing that could be cut..&lt;/p&gt;&lt;p&gt;I've put together a shell script that will:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create a new Radiant instance and&lt;/li&gt;&lt;li&gt;Make it a git repository&lt;/li&gt;&lt;li&gt;Create a local development and test database&lt;/li&gt;&lt;li&gt;Install all your favorite extensions through ray&lt;/li&gt;&lt;li&gt;Give you a preset Capfile, tailored to Radiant.&lt;/li&gt;&lt;/ol&gt;

&lt;h2&gt;How it works&lt;/h2&gt;

&lt;p&gt;Put the contents of &lt;a href=&quot;http://gist.github.com/86081&quot;&gt;this gist&lt;/a&gt; in a file at /usr/local/bin. If you want to call the script with 'kickstart', as I do, create a file at /usr/local/bin/kickstart (kickstart being a file without extension, not a dir). That's it. You can now create a new instance as such: &lt;code&gt;kickstart site_name&lt;/code&gt;If that gives you this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mbpjomz:~/rails bennydegezelle$ kickstart foo                                                                                                  
bash: /usr/local/bin/kickstart: Permission denied                                                                                                    
mbpjomz:~/rails bennydegezelle$ sudo kickstart foo                                                                                             
Password:                                                                                                                                               
sudo: kickstart: command not found&lt;/pre&gt;&lt;/code&gt;&lt;p&gt;This should fix it: &lt;pre&gt;&lt;code&gt;chmod +x /usr/local/bin/kickstart&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Sorry windows people, I have no idea how to get this going on Bill's turf..&lt;/p&gt;

&lt;p&gt;Due to the gallery extension, you need to tell which gallery layout you want. Other than that, it's a good idea to grab yourself a coffee while the script runs, as it downloads each extension live from github. Right.., let's kickstart the gems (yeah!).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MBPjomz:rails bennydegezelle$ kickstart foo
Creating new Radiant instance and initializing git repository.............[DONE]
setting up development and test db........................................[DONE]
Installing plugins........................................................[DONE]
Installing ray extension..................................................[DONE]
Installing default extensions(in /Users/bennydegezelle/rails/foo)
...
whole lotta feedback that you don't have to pay much attention to
...
Select which layout to create (leave blank to skip):
1. Simple
2. Simple carbon
3. Simple carbon with lightbox
4. Simple with lightbox
[1-4] values separated by commas: 
...
more extension installation feedback from Ray
...
Tweaking mailer ext.......................................................[DONE]
capify'ing................................................................[DONE]
committing kickstart......................................................[DONE]
setting ignore rules......................................................[DONE]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You actually don't have to wait for the gallery extension to ask for a layout number; press 1 (or nothing to skip) + enter right after the script started. It will then pass that to the script as soon as it expects feedback.&lt;/p&gt; 

&lt;p&gt;The Capistrano deploy file will go for a setup with git, mysql and Passenger. It also keeps your uploaded files (i.e. paperclipped assets and galleries) in the shared directory i.o. per release, for faster deploys and less diskspace usage. You will probably want to tweak the script to your own likings, just dive in and see how it's done! Any patches or suggestions are very welcome. And now for the second MC5 reference:&lt;/p&gt;
&lt;p&gt;I done kicked 'em out!&lt;/p&gt;</description>
          <pubDate>Tue, 05 May 2009 18:47:00 GMT</pubDate>
          <guid> http://hardcoreforkingaction.com/blog/2009/05/05/radiant-kickstart-script/</guid>
          <link> http://hardcoreforkingaction.com/blog/2009/05/05/radiant-kickstart-script/</link>
        </item>
    
  </channel>
</rss>