<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8964936</id><updated>2011-10-14T22:56:04.570Z</updated><title type='text'>On The Rails</title><subtitle type='html'>A budding Rubyist works and plays with Ruby On Rails, the MVC web development framework of the new millenium. He writes about it too.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8964936.post-110089193601882881</id><published>2004-11-19T18:55:00.000Z</published><updated>2004-11-19T19:18:56.016Z</updated><title type='text'>Driving elsewhere</title><content type='html'>&lt;p&gt;From "3 posts in 3 days" to 1 post in 1 week, I hate being a fickle blogger. Alas, like many RoRers, our Rails project is a part time affair, and this week other work was paying the bills.&lt;/p&gt;&lt;p&gt;Also contributing to my IDE-absence is last weeks addition of a valuable new Dev team member, referred to herein as Voon (for reasons that shall remain unclear). Unlike this pretender, Voon's got the goods: solid web app development experience, strong knowledge of a variety of programming languages and methodologies, and a keen interest in using Rails. We're lucky to have him.&lt;/p&gt;&lt;p&gt;On arrival, Voon introduced us old-schoolers to the concept of &lt;a href="http://www.objectmentor.com/writeUps/TestDrivenDevelopment"&gt;Test Driven Development&lt;/a&gt; (TDD). The software development process lying at the heart of &lt;a href="http://www.extremeprogramming.org"&gt;XP&lt;/a&gt;, TDD focuses on developing incremental chunks of system functionality by writing test code before real code. These tests are effectively executable system requirements. Write them first, and you end up with "Code that works". More importantly, refactoring is easy and safe - your regression tests are already there. So, the theory goes, you end up with "Clean code that works".&lt;/p&gt;&lt;p&gt;Of course, this approach mandates you know your requirements. A statement of the bleeding obvious perhaps, but here's the key: in TDD, the test documents the requirement. So before (and while) you code, you need to know not only what system functionality is required, but how it can be tested.&lt;/p&gt;&lt;p&gt;Why the hell am I writing all this? Voon's introducing TDD has forced us to stop arsing about and focus on documenting our requirements in solid testable User Stories. And that, my friends, is a Good Thing &amp;trade;.&lt;/p&gt;&lt;p&gt;&lt;span style="font-style:italic;"&gt;Any thoughts or experiences employing different software development methodologies? Feel free to comment...&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964936-110089193601882881?l=ontherails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/110089193601882881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8964936&amp;postID=110089193601882881' title='51 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/110089193601882881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/110089193601882881'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/2004/11/driving-elsewhere.html' title='Driving elsewhere'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>51</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964936.post-110022016267985356</id><published>2004-11-12T01:11:00.000Z</published><updated>2004-11-12T10:37:15.016Z</updated><title type='text'>IOC comes to town</title><content type='html'>&lt;p&gt;Dave Thomas (the &lt;a href="http://www.pragmaticprogrammer.com/press_releases/ruby.html"&gt;Pickaxe&lt;/a&gt; forger) &lt;a href="http://www.pragprog.com/pragdave/Tech/TransparentIOC.rdoc"&gt;explains in plain simple English what Dependency Injection (DI) and Inversion of Control (IOC) can do&lt;/a&gt; for an implementation that uses RoR.&lt;/p&gt;&lt;p&gt;I'll admit I read Jamis' article (see &lt;a href="http://ruby.jamisbuck.org/rails-injected.html"&gt;Rails, Injected&lt;/a&gt;) after picking it up from the wiki yesterday but, not being a true propellerhead, I was left scratching my head wondering what to make of it.&lt;/p&gt;&lt;p&gt;Dave distills it down to this: IOC means the controller is not so tightly coupled to the model.&lt;/p&gt;&lt;p&gt;What does this mean? Well, unit/ functional testing of a controller is easier, as a mock class can be substituted by the DI framework (in this case, &lt;a href="http://needle.rubyforge.org/"&gt;Needle&lt;/a&gt;) at runtime. Also, your datasources are more flexible as different (non-&lt;a href="http://activerecord.rubyonrails.org/show/HomePage"&gt;AR&lt;/a&gt;) backends can used in place of certain models, but not others. Shared services and application configuration are more intuitive and flexible, even dynamic (ie. application logic can contribute to the configuration, like "an object can add itself to an array of parties that are interested in being notified of some event"). Very nice.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964936-110022016267985356?l=ontherails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.pragprog.com/pragdave/Tech/TransparentIOC.rdoc' title='IOC comes to town'/><link rel='replies' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/110022016267985356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8964936&amp;postID=110022016267985356' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/110022016267985356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/110022016267985356'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/2004/11/ioc-comes-to-town.html' title='IOC comes to town'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964936.post-110010846139682118</id><published>2004-11-10T17:35:00.000Z</published><updated>2004-11-10T17:51:48.140Z</updated><title type='text'>Thoughtworks</title><content type='html'>&lt;p&gt;&lt;a href="http://www.loudthinking.com"&gt;DHH&lt;/a&gt; has always acknowledged the influence of &lt;a href="http://www.martinfowler.com"&gt;Martin Fowler's&lt;/a&gt; &lt;a href="http://www.martinfowler.com/eaaCatalog/"&gt;patterns&lt;/a&gt; in the design of RoR. Indeed, I believe "&lt;a href="http://www.martinfowler.com/eaaCatalog/activeRecord.html"&gt;Active Record&lt;/a&gt;" is Fowler's own terminology.&lt;/p&gt;&lt;p&gt;I noticed today that &lt;a href="http://www.thoughtworks.com/profiles/?Shaw,+Julias"&gt;Julias&lt;/a&gt; from &lt;a href="http://www.thoughtworks.com"&gt;Thoughtworks&lt;/a&gt;, where Fowler is Chief Scientist, announced on the wiki that they're &lt;a href="http://www.rubyonrails.org/show/CommercialSupport"&gt;actively seeking RoR projects&lt;/a&gt;. Very interesting.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964936-110010846139682118?l=ontherails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.rubyonrails.org/show/CommercialSupport' title='Thoughtworks'/><link rel='replies' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/110010846139682118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8964936&amp;postID=110010846139682118' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/110010846139682118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/110010846139682118'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/2004/11/thoughtworks.html' title='Thoughtworks'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964936.post-109934251920313280</id><published>2004-11-07T19:49:00.000Z</published><updated>2004-11-08T23:07:39.223Z</updated><title type='text'>Gotchas (Part 1)</title><content type='html'>&lt;p&gt;I thought I&amp;#8217;d list a few random tips, problems &amp;amp; fixes I&amp;#8217;ve discovered over the last few weeks on setting up and using my RoR development instance. Before I do, three caveats:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I&amp;#8217;m no Apache or Ruby expert&lt;/li&gt;&lt;li&gt;My development platform is Windows XP (yes, I know&amp;#8230; not all of us have the luxury of a &lt;a href="http://www.apple.com"&gt;Nice Computer&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;This list just a brain dump, and far from exhaustive. If you like, feel free to &lt;a href="http://www.blogger.com/comment.g?blogID=8964936&amp;postID=109934251920313280"&gt;contribute your own&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;To business:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;If you&amp;#8217;re doing a gem install, make sure you have the latest version of &lt;a href="http://rubygems.rubyforge.org/wiki/wiki.pl"&gt;Ruby Gems&lt;/a&gt;&lt;/strong&gt; ~ I didn&amp;#8217;t, and kept getting a Gem::FormatException error when Rails tried to update it&amp;#8217;s dependencies (namely rake). I believe it has something to do a change in the way gems are packaged.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Make sure you follow the &lt;a href="http://www.rubyonrails.org/show/GettingStartedWithRails"&gt;Getting Started&lt;/a&gt; page &lt;em&gt;to the letter&lt;/em&gt;, especially if you&amp;#8217;re on Windows&lt;/strong&gt; ~ In my rush to try and set things up, I missed setting up the c:/tmp directory and updating the shebangs of ~/script/new_controller and ~/script/new_model. Headaches insued.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Consider avoiding Apache&lt;/strong&gt; ~ Setting it up can cause unnecessary pain for the uninitiated. I dug around for ages with my hosts and httpd.conf files trying to get VHosts working. Then I realised that Rails already ships with a webserver called WEBrick that works really well for development purposes, no configuration required. I&amp;#8217;ve not had a problem since.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don&amp;#8217;t forget to require your models in your controllers&lt;/strong&gt; ~ Pretty basic, I know, but sometimes it&amp;#8217;s the bleeding obvious can trip you up&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use &amp;#8220;Show session dump&amp;#8221; under Request when ActiveRecord or the ActionController returns an error to your browser&lt;/strong&gt; ~ This is how I figured out what was going wrong when I had problems getting &lt;a href="http://ontherails.blogspot.com/2004/11/authentication.html"&gt;authentication to work&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;em&gt;Update:&lt;/em&gt; Alex maintains &lt;a href="http://www.ruby-forum.org/bb/viewtopic.php?t=14"&gt;a very useful list of RoR gotchas&lt;/a&gt;. Some of them are pretty low level, but you'll be surprised at how quickly you start coming across them. Good stuff&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964936-109934251920313280?l=ontherails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/109934251920313280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8964936&amp;postID=109934251920313280' title='204 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109934251920313280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109934251920313280'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/2004/11/gotchas-part-1.html' title='Gotchas (Part 1)'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>204</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964936.post-109958978984040623</id><published>2004-11-04T16:25:00.000Z</published><updated>2004-11-04T17:40:20.370Z</updated><title type='text'>Loudthinkers</title><content type='html'>&lt;p&gt;&lt;a href="http://www.loudthinking.com/about.html"&gt;Someone &lt;/a&gt;had some &lt;a href="http://www.loudthinking.com/arc/000345.html"&gt;kind words about my blog&lt;/a&gt; on his blog. Thanks David, both for the recognition, and for making our lives easier by releasing your baby to the world at-large.&lt;/p&gt;&lt;p&gt;For the Loudthinkers, thanks for dropping by. Content is somewhat thin on the ground at present, but hopefully that&amp;#8217;s excusable given &lt;em&gt;On The Rails&lt;/em&gt; is only a couple of days old :)&lt;/p&gt;&lt;p&gt;Please keep checking in or, even better, stick &lt;a href="http://ontherails.blogspot.com/atom.xml"&gt;the feed&lt;/a&gt; in your favourite newsreader.&lt;/p&gt;&lt;p&gt;My RoR are skills greener than this blogger template, so there&amp;#8217;ll be plenty of places where my example code could be improved, or where I&amp;#8217;ve just plain got it wrong. Don&amp;#8217;t be shy, leave a comment and let me know. Sharing is a wonderful thing.&lt;/p&gt;&lt;p&gt;I&amp;#8217;m feeling all warm and fuzzy&amp;#8230; think I might go cut some code&amp;#8230;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964936-109958978984040623?l=ontherails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/109958978984040623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8964936&amp;postID=109958978984040623' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109958978984040623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109958978984040623'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/2004/11/loudthinkers.html' title='Loudthinkers'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964936.post-109956557544600178</id><published>2004-11-04T10:48:00.000Z</published><updated>2004-11-04T17:57:16.253Z</updated><title type='text'>An Informative Rails Presentation</title><content type='html'>&lt;p&gt;I have no idea who Curt Hibbs is, or where &lt;a href="http://rubyforge.org/docman/view.php/251/123/Rails-04-10-29.pdf"&gt;the presentation&lt;/a&gt; was given. But its a nice intro to Ruby and RoR, especially for you mugs who like to see lots of code (Hat Tip: &lt;a href="http://www.livejournal.com/~gnuvince/"&gt;GNUVince&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;&lt;em&gt;Update:&lt;/em&gt; Curt &lt;a href="http://ontherails.blogspot.com/2004/11/informative-rails-presentation.html#c109957624715778341"&gt;lets us know&lt;/a&gt; he's responsible for maintaining the fantabulous &lt;a href="http://rubyinstaller.rubyforge.org/wiki/wiki.pl"&gt;One-Click Installer&lt;/a&gt; for Ruby on Windows, and for contributing to the original development of &lt;a href="http://freeride.rubyforge.org/wiki/wiki.pl"&gt;FreeRIDE&lt;/a&gt;. Apparently, he's:&lt;/p&gt;&lt;blockquote&gt;...given this presentation twice to groups of hardcore Java developers...&lt;/blockquote&gt;&lt;p&gt;Thanks Curt. Here's to hoping it inspires others to do the same.&lt;p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964936-109956557544600178?l=ontherails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://rubyforge.org/docman/view.php/251/123/Rails-04-10-29.pdf' title='An Informative Rails Presentation'/><link rel='replies' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/109956557544600178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8964936&amp;postID=109956557544600178' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109956557544600178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109956557544600178'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/2004/11/informative-rails-presentation.html' title='An Informative Rails Presentation'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964936.post-109949676590320780</id><published>2004-11-03T14:14:00.000Z</published><updated>2004-11-04T11:06:54.853Z</updated><title type='text'>Authentication</title><content type='html'>&lt;p&gt;After a few frustrations, I succeeded this morning in getting authentication working.&lt;/p&gt;&lt;p&gt;Most of the examples I&amp;#8217;ve come across are some form of variation on the example posted on &lt;a href="http://www.rubyonrails.org/show/HowtoAuthenticate"&gt;the wiki&lt;/a&gt;. It generally goes something like this:&lt;/p&gt;&lt;p&gt;Setup the login controller:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;class LoginController &amp;lt; ActionController::Base&lt;br /&gt;  def index&lt;br /&gt;    # show login screen&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def authenticate&lt;br /&gt;    if @session["person"] = Person.authenticate(@params["name"],&lt;br /&gt;@params["password"])&lt;br /&gt;      redirect_to :controller =&amp;gt; "main" &lt;br /&gt;    else&lt;br /&gt;      flash["alert"] = "Login failed!" &lt;br /&gt;      redirect_to :action =&amp;gt; "index" &lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&amp;#8230;and the model:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;class Person &amp;lt; ActiveRecord::Base&lt;br /&gt;  def self.authenticate(name, password)&lt;br /&gt;    find_first(&lt;br /&gt;      [ "name = '%s' AND password = '%s'", name, password ]&lt;br /&gt;    )&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;However, what they miss is the code for the view. &amp;#8220;Pretty simple&amp;#8221;, I hear you say.&lt;/p&gt;&lt;p&gt;The problem came when I wanted to use ActiveView&amp;#8217;s &lt;a href="http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html"&gt;FormHelper&lt;/a&gt;. An example:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;form action="login/authenticate" method="post"&amp;gt;&lt;br /&gt;    Name:&lt;br /&gt;    &amp;lt;%= text_field "login", "name", "size" =&amp;gt; 20 %&amp;gt;&lt;br /&gt;&lt;br /&gt;    Password:&lt;br /&gt;    &amp;lt;%= password_field "login", "password", "maxsize" =&amp;gt; 20 %&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;input type="submit" value="Save"&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above code builds the following HTML:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;form action="login/authenticate" method="post"&amp;gt;&lt;br /&gt;    Name:&lt;br /&gt;    &amp;lt;input type="text" id="login_name" name="login[name]"&lt;br /&gt;size="20" /&amp;gt;&lt;br /&gt;&lt;br /&gt;    Password:&lt;br /&gt;    &amp;lt;input type="password" id="login_password" name="login[password]"&lt;br /&gt; size="20" maxsize="20" /&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;input type="submit" value="Save"&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;All looks good, right? No. Hook these up with the example authentication code: you&amp;#8217;ll get no error, but you&amp;#8217;ll never authenticate either. Why?&lt;/p&gt;&lt;p&gt;It&amp;#8217;s because of the way the textfield and passwordfield helpers created our input fields. Have a look at the name attribute, eg. &lt;code&gt;name="login[name]"&lt;/code&gt;. As a result, the data entered in these inputs gets passed in as attributes of a @login object, which is in turn part of the @params hash.&lt;/p&gt;&lt;p&gt;However, our example LoginControler expects them to be &lt;span style="font-style:italic;"&gt;directly&lt;/span&gt; in the hash, @params. Change the controller code to reference the login hash within the params hash, like so:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;class LoginController &amp;lt; ActionController::Base&lt;br /&gt;  def index&lt;br /&gt;    # show login screen&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  def authenticate&lt;br /&gt;    if @session["person"] = Person.authenticate(@params&lt;span style="font-weight:bold;"&gt;["login"]&lt;/span&gt;["name"],&lt;br /&gt;@params&lt;span style="font-weight:bold;"&gt;["login"]&lt;/span&gt;["password"])&lt;br /&gt;  redirect_to :controller =&amp;gt; "main" &lt;br /&gt;else&lt;br /&gt;  flash["alert"] = "Login failed!" &lt;br /&gt;  redirect_to :action =&amp;gt; "index" &lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&amp;#8230;and all of a sudden we&amp;#8217;re in business.&lt;/p&gt;&lt;p&gt;Admittedly, none of this is rocket science. In fact, you may be there thinking "that's obvious". It is&amp;#8230; in hindsight.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964936-109949676590320780?l=ontherails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/109949676590320780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8964936&amp;postID=109949676590320780' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109949676590320780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109949676590320780'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/2004/11/authentication.html' title='Authentication'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964936.post-109933856616592057</id><published>2004-11-02T11:26:00.000Z</published><updated>2004-11-03T00:52:02.663Z</updated><title type='text'>Getting Started</title><content type='html'>&lt;p&gt;So, maybe you've heard about this Rails thing. Maby you've watched &lt;a href="http://media.nextangle.com/rails/rails_setup.mov"&gt;the movie&lt;/a&gt;, and gone "Wow...". Maybe you've even followed &lt;a href="http://rubyonrails.org/show/GettingStartedWithRails"&gt;the instructions&lt;/a&gt; on the wiki and discovered a gem or three.&lt;/p&gt;&lt;p&gt;What now?&lt;/p&gt;&lt;p&gt;Well, here's a list of sites/ resources I found useful when I first started out. It's by no means definitive, so feel free to leave a comment if there's anywhere else you'd recommend budding RoRers dig.&lt;/p&gt;&lt;h4&gt;On RoR&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://rubyonrails.org/show/HomePage"&gt;rubyonrails.org&lt;/a&gt; ~ pretty obvious. But there's some good stuff kicking around the wiki. In particular: &lt;ul&gt;&lt;li&gt;&lt;a href="http://rubyonrails.org/show/RailsAcademy"&gt;The Rails Academy&lt;/a&gt; ~ tutorials created by the masses, for the masses&lt;/li&gt;&lt;li&gt;&lt;a href="http://rubyonrails.org/show/DemoApps"&gt;Example Applications&lt;/a&gt; ~ watch and learn from others&lt;/li&gt;&lt;li&gt;&lt;a href="http://rubyonrails.org/feeds/"&gt;the Wiki feed&lt;/a&gt; ~ subscribe to it with your favourite RSS reader. It's not perfect (there's something dodgy going on with the links), but with the wiki starting to sprawl a little, it's a good way of picking up on stuff you'd otherwise miss&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://rubyonrails.org/show/IRC"&gt;irc&lt;/a&gt; ~ still best place to get instant help from fellow RoRers. Play nice and they'll treat you with kid gloves. Well, almost&lt;/li&gt;&lt;li&gt;&lt;a href="http://lists.rubyonrails.org/mailman/listinfo/rails"&gt;mailing list&lt;/a&gt; ~ one bulk mail worthwhile diverting from the spam folder. Very active &amp; informative&lt;/li&gt;&lt;li&gt;"&lt;a href="http://darkhost.mine.nu:81/~vince/rails/tutorial.html"&gt;ToDo" tutorial&lt;/a&gt; ~ I've not yet worked through this in it's entirety, but Vince, my &lt;a href="http://ontherails.blogspot.com/2004/11/hello-world.html#c109935721679143274"&gt;first commenter&lt;/a&gt; has some excellent tips and tricks&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.swimshark.ca/rails/testing_tutorial.pdf"&gt;Testing with Ruby On Rails&lt;/a&gt; ~ testing is an integral part of RoR, and another area I've but dipped a toe in. Steve makes it all seem so easy in this draft tutorial. Good stuff&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;On Ruby&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.ruby-lang.org"&gt;ruby-lang.org&lt;/a&gt; ~ Ruby's official residence&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.rubygarden.org"&gt;Ruby Garden&lt;/a&gt; ~ A community blog from Ruby's English-speaking luminaries. They've also got an &lt;a href="http://www.rubygarden.org/ruby"&gt;excellent wiki&lt;/a&gt; filled with stuff for noobs and pros alike.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.rubycentral.com/book/"&gt;The PickAxe&lt;/a&gt; ~ the definitive guide to Ruby. No two ways about it: get it. Get it? (Dave &amp; Andy, the authors, have just released a much-improved 2nd Edition, available at &lt;a href="http://www.pragmaticprogrammer.com"&gt;pragmaticprogrammer.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.loudthinking.com/arc/000199.html"&gt;DHH's resources&lt;/a&gt; ~ David lists some other excellent places if, like me, you're still getting started with Ruby&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964936-109933856616592057?l=ontherails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/109933856616592057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8964936&amp;postID=109933856616592057' title='115 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109933856616592057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109933856616592057'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/2004/11/getting-started.html' title='Getting Started'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>115</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8964936.post-109933191715766733</id><published>2004-11-01T17:47:00.000Z</published><updated>2004-11-02T00:34:10.050Z</updated><title type='text'>Hello World</title><content type='html'>I've discovered a great new platform for web development.&lt;br /&gt;&lt;br /&gt;It's called &lt;a href="http://www.rubyonrails.org/"&gt;Ruby On Rails&lt;/a&gt;, or &lt;span style="font-style: italic;"&gt;RoR&lt;/span&gt; to those that love it.&lt;br /&gt;&lt;br /&gt;I've also discovered that it's still relatively undiscovered.&lt;br /&gt;&lt;br /&gt;Sure, in some circles it's generating &lt;a href="http://www.pragprog.com/pragdave/Random/RailsAndTextMate.rdoc"&gt;buzz&lt;/a&gt; &lt;a href="http://davidcrow.ca/2004/10/25/ruby_on_rails.html"&gt;akin&lt;/a&gt; &lt;a href="http://sean.typepad.com/ditto/2004/10/ruby_on_rails.html"&gt;to&lt;/a&gt; a &lt;a href="http://www.artima.com/forums/flat.jsp?forum=123&amp;thread=66159"&gt;swarm&lt;/a&gt; &lt;a href="http://www.chadfowler.com/index.cgi/Computing/Programming/BoringSoftware.rdoc,v"&gt;of&lt;/a&gt; &lt;a href="http://www.oreillynet.com/pub/wlg/5424"&gt;killer&lt;/a&gt; &lt;a href="http://www.37signals.com/svn/archives/000606.php"&gt;bees&lt;/a&gt;. Indeed, &lt;a href="http://www.google.com/search?hl=en&amp;amp;amp;amp;amp;amp;amp;lr=&amp;client=firefox-a&amp;amp;q=%22ruby+on+rails%22&amp;btnG=Search"&gt;googling "Ruby On Rails"&lt;/a&gt; just returned 6,310 links which is a hell of a lot more than a couple of months ago.&lt;br /&gt;&lt;br /&gt;Still, for mere mortals like myself, resources for new &lt;span style="font-style: italic;"&gt;RoRers &lt;/span&gt;(consider it officially coined) are not as abundant as they could be.&lt;br /&gt;&lt;br /&gt;I've often hit a problem, only to google it and come up short. Then I've either spent the next 5 hours tearing my hair out, or I've stroked my luck and come on a mailing list, irc entry or blog post that's helped me out.&lt;br /&gt;&lt;br /&gt;And there's the thing - there's heaps of people out there blogging almost exclusively about J2EE/ Struts or ASP.NET, but I've not found one yet that's focussing on our beloved RoR.&lt;br /&gt;&lt;br /&gt;So to, the purpose of this blog: write about my thoughts and experiences as I work and (if I'm feeling antisocial) play with RoR.&lt;br /&gt;&lt;br /&gt;Whether you're&lt;br /&gt;&lt;ul&gt;&lt;li&gt;a seasoned RoR or Ruby professional willing to offer the odd gem of advice,&lt;/li&gt;&lt;li&gt;a newbie (like me) who can't wait to learn new RoRing tricks,&lt;/li&gt;&lt;li&gt;so bored out of your brain you've nothing better to do than read the random ramblings of a wannabe geek...&lt;/li&gt;&lt;/ul&gt;...drop by every now and then for a cup-of-tea and a glimpse of life. &lt;span style="font-style: italic;"&gt;OnThe&lt;a href="http://www.rubyonrails.org/"&gt;Rails&lt;/a&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964936-109933191715766733?l=ontherails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ontherails.blogspot.com/feeds/109933191715766733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8964936&amp;postID=109933191715766733' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109933191715766733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8964936/posts/default/109933191715766733'/><link rel='alternate' type='text/html' href='http://ontherails.blogspot.com/2004/11/hello-world.html' title='Hello World'/><author><name>RoRy</name><uri>http://www.blogger.com/profile/02746239823887407143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry></feed>
