<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>I am Mr. Joshua? - Blog</title>
    <description>This is my blog. You should read it.</description>
    <link>http://iammrjoshua.com/blog_posts</link>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/joshnabbott" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Having trouble getting XCode running?</title>
      <description>I recently was unable to boot XCode on my laptop. I tried a few times, restarted, even reinstalled XCode to no avail.

I had a look at the error log and did a bit of Googling. Turns out, if you've installed Safari 4 beta (which I have), and even if you've since uninstalled it (which I have), XCode is unable to start up. And luckily, it's super easy to fix. Download and install XCode 3.1.2.

I downloaded it here: "http://discussions.apple.com/thread.jspa?messageID=9113369&amp;tstart=0":http://discussions.apple.com/thread.jspa?messageID=9113369&amp;tstart=0

Hopefully that fixes it for you too.</description>
      <pubDate>Sun, 19 Apr 2009 19:37:04 -0700</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/tgNkw5PVpJg/53-having-trouble-getting-xcode-running</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/53-having-trouble-getting-xcode-running</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/53-having-trouble-getting-xcode-running</feedburner:origLink></item>
    <item>
      <title>Rails: config.gem</title>
      <description>Is it just me or does &lt;pre&gt;config.gem&lt;/pre&gt; not seem to work properly?

I've specified my gem dependencies in &lt;pre&gt;config/environment.rb&lt;/pre&gt; in several Rails apps I've built, and each time it seems to backfire. Not only am I notified that I need to install certain gems to run the app, but either tests don't run properly, or rake tasks won't execute until I finally comment out the gem dependencies and go about business as usual.

Anyone else having trouble like this?</description>
      <pubDate>Thu, 19 Mar 2009 22:41:23 -0700</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/oDJAqAr0o4g/52-rails-config-gem</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/52-rails-config-gem</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/52-rails-config-gem</feedburner:origLink></item>
    <item>
      <title>Multiple select and has_many :through in Ruby on Rails</title>
      <description>I just defined a has_many :through association in a project I'm working on and when it came down to making the form view I wanted to handle this with a multiple select box. I haven't really messed with form views too in depth recently so before I started I quickly googled for "has_many :through multiple select":http://www.google.com/search?client=safari&amp;rls=en-us&amp;q=has_many+:through+multiple+select&amp;ie=UTF-8&amp;oe=UTF-8 to see what the best practice is regarding this.

Well, that search didn't really turn up much, so I thought I'd just use what I know of form behavior and what I know of the special Rails magic you get when you declare certain associations and just give it a go.

Turns out, Rails already handles this 100% gracefully and all it takes is the addition of one (1) letter.

Check it out. Here's the collection select builder I'm using (I'm assuming you already know how to declare the has_many :through association, so I'm going to just skip that part):

&lt;pre class="ruby"&gt;
&lt;%= f.label :category_ids %&gt;&lt;br /&gt;
&lt;%= f.collection_select :category_ids, Category.all, :id, :name, {}, { :multiple =&gt; true } %&gt;
&lt;/pre&gt;

Voila! That's it. Nothing else is required. Just change where it would typically say "category_id" for your belongs_to association to "category_ids" and Rails will handle the rest!

SAHWEET!</description>
      <pubDate>Fri, 20 Feb 2009 10:23:54 -0800</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/vxNOsuTY2UU/51-multiple-select-and-has_many-through-in-ruby-on-rails</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/51-multiple-select-and-has_many-through-in-ruby-on-rails</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/51-multiple-select-and-has_many-through-in-ruby-on-rails</feedburner:origLink></item>
    <item>
      <title>Cool new Ruby Gem to encrypt your sensitive model attributes</title>
      <description>First of all, I know it's been *forever* since my last post. I've been really busy... You know how that goes.

So for the sake of a new blog post, and the fact that I think this may be of interest to folks reading my blog, I thought I would post about "Sean Huber's":http://github.com/shuber new "attr_encrypted gem":http://github.com/shuber/attr_encrypted/tree/master/README.markdown:

"http://github.com/shuber/attr_encrypted/tree/master/README.markdown":http://github.com/shuber/attr_encrypted/tree/master/README.markdown

The README is very in-depth, so I won't go into much detail other than it provides a very simple and (seemingly) effective way to encrypt your Model's (ActiveRecord and DataMapper supported) more sensitive attributes, such as social security numbers, credit card numbers, and anything else that you think deserves that extra level of concern.

I know that at Oakley we go to very great lengths to keep sensitive information like this *very* private and *very* secure and this seems like it could potentially be an extra layer of security that could be added.

If you or your company isn't already taking steps to keep your customers data secure (such as log-filtering, not storing full credit card numbers/ssn's in your database, etc.) then you may want to start by gem installing and implementing this gem. You can't really be too safe anyway.

Alrighty then. That's a lot of words for a pretty straightforward topic. Go check it out: "http://github.com/shuber/attr_encrypted/tree/master/README.markdown":http://github.com/shuber/attr_encrypted/tree/master/README.markdown</description>
      <pubDate>Sat, 10 Jan 2009 21:45:47 -0800</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/UO1A3O8VEOc/50-cool-new-ruby-gem-to-encrypt-your-sensitive-model-attributes</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/50-cool-new-ruby-gem-to-encrypt-your-sensitive-model-attributes</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/50-cool-new-ruby-gem-to-encrypt-your-sensitive-model-attributes</feedburner:origLink></item>
    <item>
      <title>New Twitter plugin released!</title>
      <description>Let's pretend for one second that the world needs another Twitter plugin. Like there's not already a buttload of Ruby gems and Rails plugins out there that wrap Twitter's API functionality into a neat little package so you can incorporate Tweets into your own Rails app.

In spite of all this, I've released my own little Twitter plugin. Mainly because I needed one for this blog (that's what sends out those nifty little tweets each time I publish a new blog post) and I didn't feel like messing with existing stuff and I didn't figure writing a quick little plugin for this would take long.

And it didn't.

So without further ado, here it is. On GitHub of course. All the instructions are there as well as a pretty in-depth list of what it can and can't do.

"http://github.com/joshnabbott/twitter/tree/master":http://github.com/joshnabbott/twitter/tree/master

It's still a work in progress. Definitely not finished. But it works for what I need it for, and maybe you'll find it useful too.

As the README says, pull requests are welcome. If you can help add functionality, or improve existing functionality, please do.

Have fun tweeting!</description>
      <pubDate>Sun, 30 Nov 2008 20:24:20 -0800</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/fYCA14cPNqU/48-new-twitter-plugin-released</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/48-new-twitter-plugin-released</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/48-new-twitter-plugin-released</feedburner:origLink></item>
    <item>
      <title>Finally, a site dedicated to being metal. Just like me.</title>
      <description>I don't know how, I don't know why, but my good friend "Richard Holland":http://twitter.com/richardholland has built a Rails app called "Being Metal":http://beingmetal.com that seems to be dedicated to me. It could be because I am metal, but who knows. Richard is definitely one of those guys that does things according to the whims of the Great Magnet. The Great Magnet being whatever the fuck Richard decides to do.

Anyway, whatever his reasons, I am very honored to have a Metal Rails App&amp;trade; dedicated to me. He's definitely a "great programmer":http://drdispatch.com/ who has written a very successful desktop app (Dr. Dispatch), and has now wandered into the glorious wonderland of Ruby on Rails. Regardless of how successful "Being Metal":http://beingmetal.com becomes, it's good to know that I have a friend as cool as this!

So go check it out. Post your own "What's Metal". It's the only way we MetalHeads will ever rule this planet.

"http://beingmetal.com":http://beingmetal.com

*Richard: cheers! This shot's for you!*</description>
      <pubDate>Wed, 26 Nov 2008 20:11:01 -0800</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/wwMAnHxwJr8/47-finally-a-site-dedicated-to-being-metal-just-like-me</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/47-finally-a-site-dedicated-to-being-metal-just-like-me</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/47-finally-a-site-dedicated-to-being-metal-just-like-me</feedburner:origLink></item>
    <item>
      <title>Climbing rocks with Metal</title>
      <description>Who says work has to be work all the time? One of the cool things about working at Oakley is that I get a chance to wear some of the awesome sunglass designs that we produce. Of course, while I'm doing that I like to put my own metal twist on things.

Check it out:

"http://www.flickr.com/photos/squareo/3047955785/in/photostream/":http://www.flickr.com/photos/squareo/3047955785/in/photostream/

Climbing up a rock with some pretty cool Gascans on. I gotta say, this job is fun and I definitely make this look good.</description>
      <pubDate>Wed, 26 Nov 2008 19:48:34 -0800</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/fV0CZCsAYWg/46-climbing-rocks-with-metal</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/46-climbing-rocks-with-metal</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/46-climbing-rocks-with-metal</feedburner:origLink></item>
    <item>
      <title>Rails 2.2 RC2: Come and get it</title>
      <description>Because of this:

"http://weblog.rubyonrails.com/2008/11/14/rails-2-2-rc2-last-stop-before-final":http://weblog.rubyonrails.com/2008/11/14/rails-2-2-rc2-last-stop-before-final

Go do this:

"http://blog.segment7.net/articles/2008/11/13/rubygems-1-3-1":http://blog.segment7.net/articles/2008/11/13/rubygems-1-3-1

and then this:

&lt;pre&gt;gem install rails -s http://gems.rubyonrails.org&lt;/pre&gt;

Maybe even read this:

"http://guides.rubyonrails.org/2_2_release_notes.html":http://guides.rubyonrails.org/2_2_release_notes.html</description>
      <pubDate>Fri, 14 Nov 2008 11:47:06 -0800</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/pdFo4W9VH0M/45-rails-2-2-rc2-come-and-get-it</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/45-rails-2-2-rc2-come-and-get-it</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/45-rails-2-2-rc2-come-and-get-it</feedburner:origLink></item>
    <item>
      <title>Rails 2.2 Release Candidate 1 is here.</title>
      <description>"http://weblog.rubyonrails.org/2008/10/24/rails-2-2-rc1-i18n-thread-safety-docs-etag-last-modified":http://weblog.rubyonrails.org/2008/10/24/rails-2-2-rc1-i18n-thread-safety-docs-etag-last-modified

What are you waiting for? Get it!

&lt;pre&gt;
joshnabbott:~ joshnabbott$ sudo gem install rails -s http://gems.rubyonrails.org -v 2.2.0
Password:
Successfully installed activesupport-2.2.0
Successfully installed activerecord-2.2.0
Successfully installed actionpack-2.2.0
Successfully installed actionmailer-2.2.0
Successfully installed activeresource-2.2.0
Successfully installed rails-2.2.0
6 gems installed
Installing ri documentation for activesupport-2.2.0...
Installing ri documentation for activerecord-2.2.0...
Installing ri documentation for actionpack-2.2.0...
Installing ri documentation for actionmailer-2.2.0...
Installing ri documentation for activeresource-2.2.0...
Installing RDoc documentation for activesupport-2.2.0...
Installing RDoc documentation for activerecord-2.2.0...
Installing RDoc documentation for actionpack-2.2.0...
Installing RDoc documentation for actionmailer-2.2.0...
Installing RDoc documentation for activeresource-2.2.0...
joshnabbott:~ joshnabbott$ rails -v
Rails 2.2.0
joshnabbott:~ joshnabbott$ 
&lt;/pre&gt;</description>
      <pubDate>Fri, 24 Oct 2008 13:26:04 -0700</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/becgjqg9yo4/44-rails-2-2-release-candidate-1-is-here</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/44-rails-2-2-release-candidate-1-is-here</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/44-rails-2-2-release-candidate-1-is-here</feedburner:origLink></item>
    <item>
      <title>No more comment spam with Defensio?</title>
      <description>In spite of the fact that my new blog only went up about a month ago, the comment spambots have already found and taken several massive shits on my site. Which I thought was odd seeing as how I don't have *that* much traffic to my site, and very few comments get left. Apparently, that's not criteria the spammers are looking for and it became very apparent that I needed to implement some sort of protection against comment spam.

My first thought was to go with the tried and true "Akismet":http://akismet.com/. I've used Akismet before and have had good results with it. It has been a while since I last used any sort of comment spam protection, so I thought I'd do a quick google search for "comment spam blocker rails":http://www.google.com/search?hl=en&amp;client=safari&amp;rls=en-us&amp;q=comment+spam+blocker+rails&amp;btnG=Search which turned up "this article":http://www.softiesonrails.com/2007/11/26/about-comment-spam. I started reading through the comments and saw someone mentioned a comment spam blocker I hadn't heard of called "Defensio":http://defensio.com/ (along with some other comment spam solutions I hadn't heard of either). After visiting the various sites, and looking at the possible implementation, I decided to hold off on Akismet and give Defensio a go. It seems that Defensio is gaining a good reputation and is considered to give Akismet a "pretty good run":http://www.problogger.net/archives/2007/11/08/defensio-launches-a-competitor-for-akismet/ "for it's money":http://activereload.net/2007/8/19/akismet-vs-defensio-round-1. In addition to the fact that there's a Defensio plugin, and some pretty good documentation for getting it up and running, Defensio also has a very nice looking Account Management interface and some useful graphics and statistics.

As of this post, I've had Defensio running on my site for the last two days and have seen a greatly reduced number of spam comments showing up in my humble blog posts. Not *all* spam has been caught, but I've read that "Defensio gets better with time":http://macournoyer.wordpress.com/2007/09/11/defensio-on-rails/ so I'm going to be keeping an eye on the comments that are being posted on my site. All in all though, I'm pleased as pop knowing that fewer spam comments are making it to my site.

So if you're reading this thinking "Hmm... maybe I'll give Defensio a try..." I've even taken the time to post the links you'll need to get it going in your Rails project:

"The plugin":http://defensio.com/downloads/rails/
"The instructions":http://macournoyer.wordpress.com/2007/09/11/defensio-on-rails/
"The docs":http://code.macournoyer.com/defensio/

**Some tidbits you may find helpful**

A few helpful things I'll mention (that didn't seem readily apparent, and I spent a little time trying to figure out) - by default, Defensio assume that the comment will be associated to an Article, not a blog post, and unless you specify the proper association, you'll get an error from Defensio looking something like this:

&lt;pre&gt;You must specify an assiociated object which acts_as_defensio_article&lt;/pre&gt;

This is easily fixed by setting the proper association object in the :fields hash when you call 'acts_as_defensio_comment':

&lt;pre class="ruby"&gt;acts_as_defensio_comment :fields =&gt; { :article =&gt; :blog_post }&lt;/pre&gt;

Defensio also expects there to be an author and author_email method for your BlogPost class. Since I'm a one man operation, I don't have those columns, and hence didn't have those as instance methods. So I just added those two methods to my BlogPost model:

&lt;pre class="ruby"&gt;
def author
  'Josh N. Abbott'
end

def author_email
  'joshnabbott@mac.com'
end
&lt;/pre&gt;

Once I figured those two things out, it was smooth sailing.
</description>
      <pubDate>Sun, 19 Oct 2008 17:25:14 -0700</pubDate>
      <link>http://feedproxy.google.com/~r/joshnabbott/~3/0qsExRZLwyQ/43-no-more-comment-spam-with-defensio</link>
      <guid isPermaLink="false">http://iammrjoshua.com/blog_posts/43-no-more-comment-spam-with-defensio</guid>
    <feedburner:origLink>http://iammrjoshua.com/blog_posts/43-no-more-comment-spam-with-defensio</feedburner:origLink></item>
  </channel>
</rss>
