<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>tekin.co.uk - Ruby on Rails developer, Tekin Suleyman, Manchester UK</title>
 <link href="http://tekin.co.uk/atom.xml" rel="self"/>
 <link href="http://tekin.co.uk/"/>
 <updated>2011-10-04T13:55:46+01:00</updated>
 <id>http://tekin.co.uk/</id>
 <author>
   <name>Tekin Suleyman</name>
   <email>tekin@tekin.co.uk</email>
 </author>

 
 <entry>
   <title>The MagRails Attendee's Guide To Manchester</title>
   <link href="http://tekin.co.uk/2011/10/the-mag-rails-attendees-guide-to-manchester"/>
   <updated>2011-10-04T00:00:00+01:00</updated>
   <id>http://tekin.co.uk/2011/10/the-mag-rails-attendees-guide-to-manchester</id>
   <content type="html">&lt;p&gt;Attending the &lt;a href=&quot;http://www.magrails.com/&quot;&gt;MagRails Conference&lt;/a&gt; here in Manchester next week? Never been to the city and in need of some pointers? Well you&amp;#8217;ve come to the right place! Here follows my whistle-stop tour of our fair city, aimed at helping you get the most out of your stay in Manchester. I&amp;#8217;m not going to pretend this is a comprehensive guide; in fact it&amp;#8217;s anything but. It&amp;#8217;s essentially the list of places I&amp;#8217;d recommend to a visiting friend. I&amp;#8217;ve focused mainly on Manchester&amp;#8217;s Northern Quarter as this is where the conference is taking place and I&amp;#8217;ve also tried to avoid chains as much as possible &amp;#8211; if you really want to find the nearest Starbucks or McDonalds, then you won&amp;#8217;t struggle.&lt;/p&gt;
&lt;h2&gt;The &lt;span class=&quot;caps&quot;&gt;NWRUG&lt;/span&gt; Drink Up, Sponsored by Engine Yard&lt;/h2&gt;
&lt;p&gt;If you arrive the night before the conference, then be sure to head straight over to &lt;a href=&quot;http://www.noho-bar.com&quot;&gt;NoHo bar&lt;/a&gt; where the &lt;a href=&quot;http://nwrug.org&quot;&gt;North West Ruby User Group&lt;/a&gt; (&lt;span class=&quot;caps&quot;&gt;NWRUG&lt;/span&gt;) are holding a social drink-up, generously sponsored by &lt;a href=&quot;http://www.engineyard.com/&quot;&gt;Engine Yard&lt;/a&gt;. Things kick off from 7:30pm, more details on the &lt;a href=&quot;http://nwrug.org/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;NWRUG&lt;/span&gt; website&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;The Best Place for a Coffee&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/images/30092011/north-tea-power-manchester.jpg&quot; title=&quot;North Tea Power, Manchester&quot; alt=&quot;North Tea Power, Manchester&quot; /&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re after a proper coffee in Manchester city centre, then there is only one place to go: &lt;a href=&quot;http://northteapower.co.uk/&quot;&gt;North Tea Power&lt;/a&gt;. Whether it&amp;#8217;s a flat white, espresso or single origin V60 pour-over you&amp;#8217;re after, the guys and girls at &lt;span class=&quot;caps&quot;&gt;NTP&lt;/span&gt; will always deliver the goods. It&amp;#8217;s also laptop-friendly, has free WiFi and is just a short walk from the conference venue.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://teacupandcakes.com/&quot;&gt;TeaCup&lt;/a&gt; on Thomas St also does an excellent coffee and has a great range of teas and homemade cakes and also does mean poached eggs for breakfast. Other places to visit include the wonderfully quirky &lt;a href=&quot;http://www.oklahomacafe.co.uk/&quot;&gt;Oklahoma&lt;/a&gt;, &lt;a href=&quot;http://www.sugarjunction.co.uk/&quot;&gt;Suger Junction&lt;/a&gt; for something sweet, and &lt;a href=&quot;http://www.thekoffeepot.co.uk/&quot;&gt;Koffee Pot&lt;/a&gt; for their amazing cooked breakfasts.&lt;/p&gt;
&lt;h2&gt;Where to Eat&lt;/h2&gt;
&lt;p&gt;There are plenty of great places to grab a bite around the city, and you&amp;#8217;re especially lucky during the week of the conference as the &lt;a href=&quot;http://foodanddrinkfestival.com&quot;&gt;Manchester Food and Drink Festival&lt;/a&gt; is on &amp;#8211; be sure to check the programme for some culinary treats.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re after a a quick, simple lunch during the day, you have quite a few options. The falafel and haloumi kebab at &lt;a href=&quot;http://www.aplacecalledcommon.co.uk/&quot;&gt;Common&lt;/a&gt; in the Northern Quarter is a personal favourite, as is the &lt;a href=&quot;http://www.walrusmanchester.com/&quot;&gt;Walrus&lt;/a&gt; bento box. For some tasty Korean food, head to &lt;a href=&quot;http://www.yelp.co.uk/biz/baekdu-manchester&quot;&gt;Baekdu&lt;/a&gt; on Shudehill. If you&amp;#8217;re after choice, then you could do worse than visit the &lt;a href=&quot;http://www.manchestermarkets.com/Central-Markets/Manchester-Arndale-Market/The-Arndale-Market_1_p2.asp&quot;&gt;Arndale Market Food Hall&lt;/a&gt; &amp;#8211; plenty of options here for food from around the world, but special mention has to go out to Pancho&amp;#8217;s Burritos; just don&amp;#8217;t forget the habanero sauce! Vegetarians and Vegans should check out &lt;a href=&quot;http://www.earthcafe.co/&quot;&gt;Earth Cafe&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/30092011/earth-cafe-manchester.jpg&quot; title=&quot;Earth Cafe, Manchester&quot; alt=&quot;Earth Cafe, Manchester&quot; /&gt;&lt;/p&gt;
&lt;p&gt;There are also a couple of lunch options around Piccadilly Gardens, such as &lt;a href=&quot;http://www.barburrito.co.uk/&quot;&gt;Bar Burrito&lt;/a&gt;, &lt;a href=&quot;http://www.ricebars.com/&quot;&gt;Rice&lt;/a&gt; and &lt;a href=&quot;http://www.kro.co.uk/kro-piccadilly&quot;&gt;Kro&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However, if lunch like a proper Mancunian is what you&amp;#8217;re after, then a visit to one of the Northern Quarter&amp;#8217;s famous back-street curry caf&amp;eacute;s is a must. Be prepared for some very basic surroundings with canteen-style service, but quite possibly the tastiest curry for under a fiver you will ever have! Popular places include &lt;a href=&quot;http://thisandthatcafe.co.uk/&quot;&gt;This &amp;amp; That&lt;/a&gt;, &lt;a href=&quot;http://www.yelp.co.uk/biz/yadgar-cafe-manchester&quot;&gt;Yadgar&lt;/a&gt; and &lt;a href=&quot;http://www.yelp.co.uk/biz/al-faisal-tandoori-manchester&quot;&gt;Al Faisal&lt;/a&gt;, although my personal favourite (and possibly the most insalubrious) is definitely &lt;a href=&quot;http://www.yelp.co.uk/biz/cafe-marhaba-manchester&quot;&gt;Caf&amp;eacute; Marhaba&lt;/a&gt;, if only because they make the best naan breads and rotis, straight out of a tandoor oven.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/30092011/cafe-marhaba-manchester.jpg&quot; title=&quot;Cafe Marhaba, Manchester&quot; alt=&quot;Cafe Marhaba, Manchester&quot; /&gt;&lt;/p&gt;
&lt;p&gt;For something a little more upmarket or for dining in the evening, head to: &lt;a href=&quot;http://www.market-restaurant.com/&quot;&gt;The Market Restaurant&lt;/a&gt; for the traditional British restaurant experience; &lt;a href=&quot;http://www.eastzeast.com/&quot;&gt;East Z East&lt;/a&gt; for a fantastic curry; &lt;a href=&quot;http://www.chaophraya.co.uk/&quot;&gt;Chaophraya&lt;/a&gt; for great Thai food; &lt;a href=&quot;http://markaddy.co.uk/&quot;&gt;The Mark Addy&lt;/a&gt; or &lt;a href=&quot;http://samsmanchester.thevictorianchophousecompany.com/&quot;&gt;Sam&amp;#8217;s Chop House&lt;/a&gt; for top quality English pub grub; &lt;a href=&quot;http://www.sancarlo.co.uk/manchester&quot;&gt;San Carlo&lt;/a&gt; or &lt;a href=&quot;http://www.sancarlocicchetti.co.uk/&quot;&gt;Cicchetti&lt;/a&gt; for Italian food; &lt;a href=&quot;http://www.doughpizzakitchen.co.uk/&quot;&gt;Dough&lt;/a&gt; for pizza; &lt;a href=&quot;http://www.yelp.co.uk/biz/baekdu-manchester&quot;&gt;Baekdu&lt;/a&gt; for Korean; &lt;a href=&quot;http://www.yelp.co.uk/biz/tokyo-season-manchester&quot;&gt;Tokyo Season&lt;/a&gt; for Japanese; &lt;a href=&quot;http://www.redchillirestaurant.co.uk/manchester_gallery.asp&quot;&gt;Red Chilli&lt;/a&gt; for spicy Sichuan Chinese food; and &lt;a href=&quot;http://www.littleyangsing.co.uk/&quot;&gt;Little Yan Sing&lt;/a&gt; for more traditional Chinese cuisine.&lt;/p&gt;
&lt;h2&gt;Ale Drinkers Rejoice!&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/images/30092011/port-street-beer-house-manchester.jpeg&quot; title=&quot;Port Street Beer House, Manchester&quot; alt=&quot;Port Street Beer House, Manchester&quot; /&gt;&lt;/p&gt;
&lt;p&gt;If you like your beer, then you are in for a treat! First on your list of places to visit should be The &lt;a href=&quot;http://portstreetbeerhouse.co.uk/&quot;&gt;Port Street Beer House&lt;/a&gt;. Serving a vast selection of craft beers from around the world, you cannot fail to find something exciting to quench your beer-thirst.&lt;/p&gt;
&lt;p&gt;Not far from Port Street is &lt;a href=&quot;http://www.yell.com/reviews/bar+fringe-1o52086-r&quot;&gt;Bar Fringe&lt;/a&gt;. A real Mancunian institution with more of a focus on continental beers from across Europe, they also have a good range of local British ales. You can expect fewer Hipsters than Port Street, plus your money will definitely go further.&lt;/p&gt;
&lt;p&gt;You&amp;#8217;d also do well to visit Manchester&amp;#8217;s very own microbrewery, located in the Grade II listed &lt;a href=&quot;http://manchester-blog.com/the-marble-arch-pub-review/&quot;&gt;Marble Arch pub&lt;/a&gt; on Rochdale Road. Situated in Ancoats &amp;#8211; the heart Manchester&amp;#8217;s industrial revolution &amp;#8211; this is where the Marble Brewery produce their casks ales, all of which are strictly organic and vegan. They&amp;#8217;ve also recently opened up a &lt;a href=&quot;http://www.citylife.co.uk/news_and_reviews/reviews/10018296_review__57_thomas_street&quot;&gt;bar on Thomas Street&lt;/a&gt; if you want to sample a Marble beer without the walk into Ancoats. Try the Chocolate Marble.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/30092011/marble-arch-pub-manchester.jpg&quot; title=&quot;Marble Arch Pub, Ancoats Manchester&quot; alt=&quot;Marble Arch Pub, Ancoats Manchester&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Other bars worth of a mention include: &lt;a href=&quot;http://www.aplacecalledcommon.co.uk/&quot;&gt;Common&lt;/a&gt; (run by the same lot who run Port St), &lt;a href=&quot;http://soup-kitchen.co.uk/&quot;&gt;Soup Kitchen&lt;/a&gt;; and &lt;a href=&quot;http://thecastlehotel.info/&quot;&gt;The Castle Hotel&lt;/a&gt;. Oh, and if drinking in an ex-public toilet sounds appealing, then head to &lt;a href=&quot;http://www.qype.co.uk/place/76428-The-Temple-of-Convenience-Manchester&quot;&gt;The Temple of Convenience&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/30092011/common-bar-manchester.jpg&quot; title=&quot;Common Bar, Manchester&quot; alt=&quot;Common Bar, Manchester&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The cocktail drinkers amongst you should head to either &lt;a href=&quot;http://www.kekomoku.co.uk/&quot;&gt;Keko Moku&lt;/a&gt; or &lt;a href=&quot;http://www.apothecabar.co.uk/about.asp&quot;&gt;Apotheca&lt;/a&gt;, both within spitting distance of each other. &lt;a href=&quot;http://www.cloud23bar.com/&quot;&gt;Cloud 23&lt;/a&gt; might also tickle your fancy, if only for the views over Manchester from the 23nd floor. Wine buffs should head for &lt;a href=&quot;http://www.hangingditch.com/&quot;&gt;Hangingditch&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Music Fans&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/images/30092011/piccadilly-records-manchester.jpg&quot; title=&quot;Picadilly Records, Manchester&quot; alt=&quot;Picadilly Records, Manchester&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The music fans amongst you will want to check out both &lt;a href=&quot;http://www.vinylexchange.co.uk/&quot;&gt;Vinyl Exchange&lt;/a&gt; and &lt;a href=&quot;http://www.piccadillyrecords.com&quot;&gt;Piccadilly Records&lt;/a&gt; &amp;#8211; both top-quality independent record shops. There&amp;#8217;s also a thriving music scene in Manchester, with plenty of clubs and gig venues across the city, catering for all tastes. Venues to check out for some live music or clubbing: &lt;a href=&quot;http://www.islingtonmill.com/&quot;&gt;Islington Mill&lt;/a&gt;, &lt;a href=&quot;http://bandonthewall.org/&quot;&gt;Band on the Wall&lt;/a&gt;, &lt;a href=&quot;http://thedeafinstitute.co.uk/&quot;&gt;The Deaf Institute&lt;/a&gt;, &lt;a href=&quot;http://www.therubylounge.org/&quot;&gt;The Ruby Lounge&lt;/a&gt;, &lt;a href=&quot;http://www.nightnday.org/&quot;&gt;Night &amp;amp; Day Café&lt;/a&gt;, &lt;a href=&quot;http://www.mattandphreds.com/&quot;&gt;Matt &amp;amp; Phreds Jazz club&lt;/a&gt; (which also does a &lt;a href=&quot;http://www.youtube.com/watch?v=36BvyC_ODRM&quot;&gt;pretty good&lt;/a&gt; pizza), &lt;a href=&quot;http://soup-kitchen.co.uk/&quot;&gt;Soup Kitchen&lt;/a&gt; or &lt;a href=&quot;http://www.mintlounge.com/&quot;&gt;Mint Lounge&lt;/a&gt;. The guys at &lt;a href=&quot;http://www.nowwave.co.uk/&quot;&gt;Now Wave&lt;/a&gt; put on several gigs a week at various venues, featuring both up and coming bands and more established acts.  Finally, it would be remiss of me not to mention the clubbing behemoth that is &lt;a href=&quot;http://www.thewarehouseproject.com/&quot;&gt;The Warehouse Project&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Culture Vultures&lt;/h2&gt;
&lt;p&gt;October is a great time to be visiting Manchester if you&amp;#8217;re into the arts. The weekend of the conference is particularly well served as the good people over at the &lt;a href=&quot;http://www.creativetourist.com&quot;&gt;Creative Tourist website&lt;/a&gt; have curated a whole weekend&amp;#8217;s worth of cultural events to keep you entertained: &lt;a href=&quot;http://www.creativetourist.com/files/Weekender-2011.pdf&quot;&gt;The Manchester Weekender&lt;/a&gt;. And if you&amp;#8217;re into independent cinema, be sure to pay &lt;a href=&quot;http://www.cornerhouse.org/&quot;&gt;The Cornerhouse&lt;/a&gt; a visit.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/30092011/cornerhouse-manchester.jpg&quot; title=&quot;Cornerhouse, Manchester&quot; alt=&quot;Cornerhouse, Manchester&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Nearest Apple Store&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/images/30092011/apple-store-manchester.jpg&quot; title=&quot;Apple Store, Manchester&quot; alt=&quot;Apple Store, Manchester&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Knowing the location of your nearest &lt;a href=&quot;http://www.apple.com/uk/retail/manchesterarndale/&quot;&gt;Apple store&lt;/a&gt; is very important, especially if the rumours are to be believed and the soon-to-be-announced iPhone 5 is released on the day of the conference&amp;#8230;&lt;/p&gt;
&lt;h2&gt;MadLab &amp;#8211; The Manchester Digital Laboratory&lt;/h2&gt;
&lt;p&gt;Manchester&amp;#8217;s very own community hack space, this is where many of the local user groups and tech meet-ups happen. Check the &lt;a href=&quot;http://madlab.org.uk/&quot;&gt;MadLab website&lt;/a&gt; for more details.&lt;/p&gt;
&lt;h2&gt;Don&amp;#8217;t forget your brolly!&lt;/h2&gt;
&lt;p&gt;Manchester isn&amp;#8217;t known as the Rainy City for nothing!&lt;/p&gt;
&lt;p&gt;If you find this useful, want any more pointers or spot anything I&amp;#8217;ve missed, feel free to drop me a line on &lt;a href=&quot;http://twitter.com/tekin&quot;&gt;Twitter&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Default Attributes on Active Record Associations in Rails</title>
   <link href="http://tekin.co.uk/2011/08/default-attributes-on-active-record-associations"/>
   <updated>2011-08-26T00:00:00+01:00</updated>
   <id>http://tekin.co.uk/2011/08/default-attributes-on-active-record-associations</id>
   <content type="html">&lt;p&gt;I implemented a quick hack today to extend an Active Record association such that you can define default attributes:&lt;/p&gt;
&lt;div class=&quot;big_code_top&quot;&gt;&lt;/div&gt;&lt;div class=&quot;big_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/1173659.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;What we&amp;#8217;re doing is &lt;a href=&quot;http://guides.rubyonrails.org/association_basics.html#association-extensions&quot;&gt;extending the association proxy object&lt;/a&gt; with a module that overrides the &lt;span class=&quot;code&quot;&gt;build&lt;/span&gt; and &lt;span class=&quot;code&quot;&gt;create&lt;/span&gt; methods such that they use the default values returned by the &lt;span class=&quot;code&quot;&gt;default_attributes&lt;/span&gt; method. Much neater than setting them elsewhere, no?&lt;/p&gt;
&lt;p&gt;I love this sort of meta-programming in Ruby, it&amp;#8217;s so much nice than the way we used to do it in the bad old days using &lt;span class=&quot;code&quot;&gt;alias_method_chain&lt;/span&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>3-Day Ruby and Rails Training Bootcamp Course in Manchester, UK</title>
   <link href="http://tekin.co.uk/2011/06/ruby-and-rails-training-course-manchester-uk"/>
   <updated>2011-06-29T00:00:00+01:00</updated>
   <id>http://tekin.co.uk/2011/06/ruby-and-rails-training-course-manchester-uk</id>
   <content type="html">&lt;p style=&quot;font-size:1.3em&quot;&gt;
&lt;p&gt;&lt;strong&gt;What:&lt;/strong&gt; &lt;a href=&quot;http://madlab.org.uk/content/ruby-rails-bootcamp/&quot;&gt;3-days intensive Ruby/Rails training for £360&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;When:&lt;/strong&gt; August 17-19th&lt;br /&gt;
&lt;strong&gt;Where:&lt;/strong&gt; &lt;a href=&quot;http://madlab.org.uk&quot;&gt;The Manchester Digital Labratory&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m pleased to announce that me and &lt;a href=&quot;http://ricroberts.com/&quot;&gt;Ric Roberts&lt;/a&gt; will be running a 3-day Ruby and Rails Bootcamp training course at &lt;a href=&quot;http://madlab.org.uk/&quot;&gt;The MadLab&lt;/a&gt; here in Manchester, UK this August. It&amp;#8217;s part of their &lt;a href=&quot;http://omniversity.madlab.org.uk/&quot;&gt;Omniversity&lt;/a&gt; programme, aimed at offering affordable, professional training in subjects as diverse as Radio Production, Arduino/Physical Computing and Short Story Writing.&lt;/p&gt;
&lt;p&gt;Our course aims to teach both the fundamentals of Ruby as well as the necessary skills and knowledge to build web applications using the Rails framework. It&amp;#8217;s aimed at anyone who has experience in web development, but doesn&amp;#8217;t require any previous Ruby or Rails experience. It&amp;#8217;s priced at a very reasonable £360, including lunch and all the tea/coffee you can drink! So if you&amp;#8217;ve always wanted to learn Ruby/Rails but have never managed to find the time/motivation to teach yourself, this is definitely the course for you. &lt;a href=&quot;http://madlab.org.uk/content/ruby-rails-bootcamp/&quot;&gt;Find out more and sign up here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;MadLab &amp;#8211; A Community Hack Space&lt;/h2&gt;
&lt;p&gt;I&amp;#8217;m really happy that this course is happening at MadLab. For those that don&amp;#8217;t know, it&amp;#8217;s a community-run hack space in the centre of the city, aimed at bringing together geeks, artists, designers, hackers; basically anyone with a general interest in tinkering and being creative. It sprung up from nothing through the hard work and dedication of some good friends of mine and has quickly become the home for many of the local tech meet-ups and craft groups. On any one day, you are just as likely to come across the &lt;a href=&quot;http://nwrug.org/&quot;&gt;North West Ruby User Group&lt;/a&gt; meeting to discuss Coffee Script as you are the &lt;a href=&quot;http://madlab.org.uk/content/writers-forum-workshop-north-3/&quot;&gt;Writers Forum North&lt;/a&gt; presenting experimental writing or &lt;a href=&quot;http://madlab.org.uk/content/fashion-hackers-7/&quot;&gt;Fashion Hackers&lt;/a&gt; knitting and sewing to raise money for Oxfam. They&amp;#8217;ve also recently &lt;a href=&quot;http://madlab.org.uk/content/diy-biology-manchester-gains-funding-for-innovative-new-%E2%80%9Ccitizen-science%E2%80%9D-partnership/&quot;&gt;secured funding for an exciting programme around &lt;span class=&quot;caps&quot;&gt;DIY&lt;/span&gt; Bio&lt;/a&gt;. If you&amp;#8217;ve not yet made it to the MadLab, I can heartily recommend a visit.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>3D Secure in Rails with Active Merchant and Sage Pay (formally ProTX)</title>
   <link href="http://tekin.co.uk/2009/07/3D-secure-with-active-merchant-and-sage-pay"/>
   <updated>2009-07-01T00:00:00+01:00</updated>
   <id>http://tekin.co.uk/2009/07/3D-secure-with-active-merchant-and-sage-pay</id>
   <content type="html">&lt;h2&gt;The Pain That is 3D Secure&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/3-D_Secure&quot;&gt;3D Secure&lt;/a&gt; is like the project manager of online payments: it’s meant to be helpful, but in reality it’s nothing but a pain in the ass. On the surface it provides a further level of authentication for consumers making online payments. &lt;a href=&quot;http://www.visaeurope.com/merchant/handlingvisapayments/cardnotpresent/verifiedbyvisa.jsp&quot;&gt;Visa&lt;/a&gt; and &lt;a href=&quot;http://www.mastercard.com/us/personal/en/cardholderservices/securecode/index.html&quot;&gt;Mastercard&lt;/a&gt; present it as a security enhancement that shifts liability away from merchants whilst also providing added safety to customers against fraud. Unfortunately it has been very poorly promoted, and manages to both confuse consumers and make the checkout process more complicated at the same time. As a result, merchant uptake has been slow, and despite regular threats from the card companies to make it compulsory, at the time of writing you can still take online payments without it. Well, almost — if you want to accept Maestro payments here in the UK, then chances are you’ll need to get them 3D Secured.&lt;/p&gt;
&lt;h2&gt;3D Secure Enabled Active Merchant for Sage Pay&lt;/h2&gt;
&lt;p&gt;To this end, I’ve &lt;a href=&quot;http://github.com/tekin/active_merchant/tree/3dsecure&quot;&gt;forked Active Merchant&lt;/a&gt; and added 3D Secure Support to the ProTX gateway. Adding 3D Secure support to other gateways shouldn’t be too difficult. For some info on potential differences between how Sage Pay and other gateways do 3D Secure, see the end of this post.&lt;/p&gt;
&lt;h2&gt;Warning and Caveats&lt;/h2&gt;
&lt;p&gt;What follows is a rough guide on how you might perform 3D Secure authentication with Sage Pay. How you actually perform the authentication process will be application specific so don’t expect things to work if you blindly copy and paste the following code into your app. The aim is to give you enough of an overview of how the process works and how my fork provides the means to complete the steps required.&lt;/p&gt;
&lt;p&gt;As part of that, I’m also assuming that you already understand and use Active Merchant for payment processing with Sage Pay and also have an understanding of the 3D Secure protocol itself. If not, there is plenty of &lt;a href=&quot;http://techsupport.protx.com/threedsecure.asp&quot;&gt;information&lt;/a&gt; out there.&lt;/p&gt;
&lt;p&gt;Finally, make sure you have good test coverage for your 3D Secure enabled code as this is a complex process with lots of potential pitfalls. To help you with this, the Bogus gateway has been updated with 3D Secure support too.&lt;/p&gt;
&lt;h2&gt;On to the Code&lt;/h2&gt;
&lt;p&gt;Firstly, once you have &lt;a href=&quot;http://github.com/tekin/active_merchant/tree/3dsecure&quot;&gt;my fork from github&lt;/a&gt;, you need to enable 3D Secure on your Sage Pay test accounts administrator page:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/01072009/enable-3d-secure.gif&quot; title=&quot;Enable 3D Secure on your Sage Pay Account Administrator Page&quot; alt=&quot;Enable 3D Secure on your Sage Pay Account Administrator Page&quot; /&gt;&lt;/p&gt;
&lt;p&gt;You will need to pass in &lt;span class=&quot;code&quot;&gt;:enable_3d_secure =&amp;gt; true&lt;/span&gt; when you instantiate your gateway:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/138323.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h2&gt;Changes to the Response and Gateway&lt;/h2&gt;
&lt;p&gt;The &lt;span class=&quot;code&quot;&gt;Response&lt;/span&gt; object now behaves subtly differently. In standard Active Merchant, a &lt;span class=&quot;code&quot;&gt;Response&lt;/span&gt; will either be successful or not:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/138324.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;With 3D Secure enabled, an unsuccessful transaction hasn’t necessarily failed, it might simply require additional 3D Authentication:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/138325.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;In this case, the &lt;span class=&quot;code&quot;&gt;Response&lt;/span&gt; object will contain the additional parameters you need to perform 3D Authentication: the PaReq, MD and &lt;span class=&quot;caps&quot;&gt;ACS&lt;/span&gt; Url.&lt;/p&gt;
&lt;p&gt;You use these parameters to redirect the user to their issuing bank where they are asked to &lt;em&gt;authenticate&lt;/em&gt; themselves by providing their password. Once they have completed authentication, the user is redirected back to your site with the results of the authentication, which you then have to send back to the gateway to ‘complete’ the transaction. You perform this with the gateway’s brand new &lt;span class=&quot;code&quot;&gt;three_d_complete&lt;/span&gt; method:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/138326.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Makes sense so far? Don’t worry, it only gets more confusing…&lt;/p&gt;
&lt;h2&gt;Performing the 3D Authentication in Your App&lt;/h2&gt;
&lt;p&gt;Assuming you are doing things RESTfully, your 3D Secure enabled &lt;span class=&quot;code&quot;&gt;PaymentsController&lt;/span&gt; may end up looking something like this:&lt;/p&gt;
&lt;div class=&quot;big_code_top&quot;&gt;&lt;/div&gt;&lt;div class=&quot;big_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/138716.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;Here, my &lt;span class=&quot;code&quot;&gt;Payment&lt;/span&gt; model encapsulates the call to the gateway and processes the response to see if it was successful or requires further 3D authentication. If authentication is required, the controller renders an iframe, into which the &lt;span class=&quot;code&quot;&gt;three_d_form&lt;/span&gt; action is loaded which redirects the user to their issuing bank for authentication:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/01072009/3d-secure-iframe.gif&quot; title=&quot;3D Authentication loaded into iframe&quot; alt=&quot;3D Authentication loaded into iframe&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Here, the orange section is the iFrame with the bank’s authentication page loaded. The three_d_iframe view code looks something like this:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/138328.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;It generates a form that redirects the user to their issuing bank for authentication. As well as the PaReq and MD, the TermUrl is sent as the &lt;span class=&quot;code&quot;&gt;three_d_complete&lt;/span&gt; action where we want to receive the callback with the result:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;	http://gist.github.com/138329.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Once/if the user completes authentication, they are redirected back to the &lt;span class=&quot;code&quot;&gt;three_d_complete&lt;/span&gt; action and we make the &lt;span class=&quot;code&quot;&gt;three_d_complete&lt;/span&gt; call back to the gateway to see if the transaction has been authorised or not (see the &lt;span class=&quot;code&quot;&gt;three_d_complete&lt;/span&gt; action in the controller code above).&lt;/p&gt;
&lt;p&gt;Finally, we break out of the iframe by rendering either &lt;span class=&quot;code&quot;&gt;verification_complete&lt;/span&gt; or &lt;span class=&quot;code&quot;&gt;verification_failed&lt;/span&gt;, depending on the result of the &lt;span class=&quot;code&quot;&gt;three_d_complete&lt;/span&gt; call:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/138332.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;And:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/138333.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h2&gt;When you want to skip 3D Secure&lt;/h2&gt;
&lt;p&gt;You can also force 3D Secure off on a per-transaction basis, simply pass &lt;span class=&quot;code&quot;&gt;:skip_3d_secure =&amp;gt; true&lt;/span&gt; with your options when you call &lt;span class=&quot;code&quot;&gt;authorize&lt;/span&gt; or &lt;span class=&quot;code&quot;&gt;purchase&lt;/span&gt;. I use this on some sites to turn 3D Secure off for all except Maestro payments so as to minimise the risk of order abandonment.&lt;/p&gt;
&lt;h2&gt;Warnings and Caveats Again&lt;/h2&gt;
&lt;p&gt;Not to sound like a broken record, but let me re-iterate that although the above code demonstrates the basics of the authentication process, it is very much sudo-code and omits much of the app specific business logic that you will need in your models. Therefore, don’t expect a copy/paste job to work, and don’t forget to test, test and more test.&lt;/p&gt;
&lt;h2&gt;Implementing 3D Secure on Other Gateways&lt;/h2&gt;
&lt;p&gt;I was hoping that this work would form the basis for a generic implementation of 3D Secure in Active Merchant. Unfortunately it would appear that it’s not as straight forward as I’d imagined. It seems that Sage Pay has a slightly different approach to 3D Authentication compared to other gateways. Sage Pay requires you make a standard &lt;em&gt;authorisation&lt;/em&gt; attempt and sends you a special response if 3D Authentication is required. You then &lt;em&gt;authenticate&lt;/em&gt; the user and send the authentication result back to Sage Pay to ‘complete’ your original &lt;em&gt;authorisation&lt;/em&gt; attempt.&lt;/p&gt;
&lt;p&gt;Other gateways (&lt;a href=&quot;https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-pro-overview-outside&quot;&gt;Payflow Pro&lt;/a&gt; for example) have a slightly different approach, and require a call to an &lt;em&gt;authenticate&lt;/em&gt; method before you attempt an &lt;em&gt;authorisation&lt;/em&gt; to check if 3D Authentication is required. So you perform the authentication first, then make an &lt;em&gt;authorisation&lt;/em&gt; call, sending the authentication results as well as the payment details. So unlike with Sage Pay, you need to send the users payment details twice, once for &lt;em&gt;authenticate&lt;/em&gt;, then again for the &lt;em&gt;authorisation&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;These differences make a common &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; for 3D Authentication in Active Merchant tricky. One approach might be to encapsulate the &lt;em&gt;authenticate&lt;/em&gt; call into the respective &lt;span class=&quot;code&quot;&gt;authorize&lt;/span&gt; and &lt;span class=&quot;code&quot;&gt;purchase&lt;/span&gt; methods, mirroring Sage Pays behaviour, and have the &lt;span class=&quot;code&quot;&gt;three_d_complete&lt;/span&gt; method make the &lt;em&gt;authorisation&lt;/em&gt; calls as necessary. This would require some potentially messy conditional logic in the &lt;span class=&quot;code&quot;&gt;authorize&lt;/span&gt; and &lt;span class=&quot;code&quot;&gt;purchase&lt;/span&gt; methods and may not be the best approach.&lt;/p&gt;
&lt;p&gt;I do have some ideas about how you could potentially make Sage Pay replicate the &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; of gateways like Payflow Pro. Unfortunately I haven’t managed to acquire a 3D Secure enabled Payflow Pro test account to try out this theory. If you can help out with this, drop me a line and who knows, maybe we can finally get a 3D Secure &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; into Active Merchant.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>New in Rails 2.3 - Disabled option tags and lambdas for selecting and disabling options from collections</title>
   <link href="http://tekin.co.uk/2009/03/new-in-rails-23-disabled-option-tags-and-lambdas-for-selecting-and-disabling-options-from-collections"/>
   <updated>2009-03-06T00:00:00+00:00</updated>
   <id>http://tekin.co.uk/2009/03/new-in-rails-23-disabled-option-tags-and-lambdas-for-selecting-and-disabling-options-from-collections</id>
   <content type="html">&lt;p&gt;As it seems to have slipped through the &lt;a href=&quot;http://weblog.rubyonrails.org/2009/2/27/this-week-in-edge-rails&quot;&gt;usual channels&lt;/a&gt;, I thought I&amp;#8217;d document a couple of enhancements to the form option helpers here.&lt;/p&gt;
&lt;h2&gt;Disabled option tags&lt;/h2&gt;
&lt;p&gt;The form option helpers have been updated so that you can now specify disabled option tags:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/81444.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Disabled option tags appear greyed out and cannot be selected by the user (or at least they do in &lt;em&gt;normal browsers&lt;/em&gt; &amp;#8211; see below).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/06032009/select-with-disabled-option-tag.gif&quot; title=&quot;Select tag with disabled option tags&quot; alt=&quot;Select tag with disabled option tags&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Lambdas for selecting and disabling option tags from collections&lt;/h2&gt;
&lt;p&gt;You can now use anonymous functions to specify which members of a collection should be selected or disabled in the resultant option tags. For example, you may want to disable product sizes that are out of stock:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/81456.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This works exactly the same for selecting values, simply pass your anonymous function in as :selected.&lt;/p&gt;
&lt;h2&gt;A word of caution &amp;#8211; always coding defensively&lt;/h2&gt;
&lt;p&gt;Although disabled option tags are part of the &lt;a href=&quot;http://www.w3.org/TR/html401/interact/forms.html#h-17.6&quot;&gt;&lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; specification&lt;/a&gt;, Internet Explorer 6 and 7 do not support them and will display disabled option tags as selectable. And although there are &lt;a href=&quot;http://apptaro.seesaa.net/article/21140090.html&quot;&gt;hacks&lt;/a&gt; to get IE to behave, you can never guarantee that disabled values will not be submitted by someone constructing a html post. Therefor, it&amp;#8217;s always best to code defensively and guard against the potential selection of disabled values in your controller actions.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Disabled option tags in rails forms</title>
   <link href="http://tekin.co.uk/2009/01/disabled-option-tags-in-rails-forms"/>
   <updated>2009-01-05T00:00:00+00:00</updated>
   <id>http://tekin.co.uk/2009/01/disabled-option-tags-in-rails-forms</id>
   <content type="html">&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href=&quot;http://github.com/rails/rails/commit/1525f3816e9b51d93d2e1356d1b90ba49213d325&quot;&gt;My patch&lt;/a&gt; has now been accepted into core, which means that as of Rails 2.3, this plugin should no longer be necessary. More details &lt;a href=&quot;http://tekin.co.uk/2009/03/new-in-rails-23-disabled-option-tags-and-lambdas-for-selecting-and-disabling-options-from-collections&quot;&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Ever wanted to disable options in a form select in rails? I have; it feels more useable to me to &lt;a href=&quot;http://www.w3schools.com/tags/att_option_disabled.asp&quot;&gt;disable&lt;/a&gt; out of stock product sizes:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/02012009/disabled-option.gif&quot; title=&quot;Select with a disabled option tag greyed out and not selectable&quot; alt=&quot;Select with a disabled option tag greyed out and not selectable&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The rails Form Option Helpers won&amp;#8217;t let you do this as they currently stand. So until &lt;a href=&quot;http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/837&quot;&gt;things change in core&lt;/a&gt;, I&amp;#8217;ve put together the &lt;a href=&quot;http://github.com/tekin/option_tags_will_disable/tree/master&quot;&gt;option_tags_will_disable&lt;/a&gt; plugin.&lt;/p&gt;
&lt;p&gt;Simply specify the disabled values when calling options_for_select:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/81467.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;You can do the same when working with collections, but more interestingly, you can also give a Proc to identify which elements should be disabled:&lt;/p&gt;
&lt;div class=&quot;small_code&quot;&gt;
&lt;script src=&quot;http://gist.github.com/81469.js&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/div&gt;&lt;div class=&quot;small_code_bottom&quot;&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;And as an added bonus, selected options can also be identified with a Proc!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Rails gets some engines love</title>
   <link href="http://tekin.co.uk/2008/11/rails-gets-some-engines-love"/>
   <updated>2008-11-26T00:00:00+00:00</updated>
   <id>http://tekin.co.uk/2008/11/rails-gets-some-engines-love</id>
   <content type="html">&lt;p&gt;No sooner is &lt;a href=&quot;http://guides.rubyonrails.org/2_2_release_notes.html&quot;&gt;Rails 2.2 out the door&lt;/a&gt; than edge Rails gets exciting again!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;github.com/rails/rails/commit/63d8f56774dcb1ea601928c3eb6c119d359fae10&quot;&gt;A tasty little commit&lt;/a&gt; hints at some major changes to the way Rails handles plugins. Finally, the awesome features of the &lt;a href=&quot;http://github.com/lazyatom/engines/tree/master&quot;&gt;engines&lt;/a&gt; plugin (lovingly crafted by &lt;a href=&quot;http://interblah.net/&quot;&gt;James Adams&lt;/a&gt;) will be creeping into core.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not one to speculate what brought about the &lt;a href=&quot;http://weblog.rubyonrails.org/2005/11/11/why-engines-and-components-are-not-evil-but-distracting&quot;&gt;change in heart&lt;/a&gt;, I&amp;#8217;m just glad Rails is finally drinking the engines Kool-Aid!&lt;/p&gt;
&lt;h2&gt;Engines? Wha?&lt;/h2&gt;
&lt;p&gt;As it says in the &lt;a href=&quot;http://github.com/lazyatom/engines/tree/master/README&quot;&gt;&lt;span class=&quot;caps&quot;&gt;README&lt;/span&gt;&lt;/a&gt;: &amp;#8220;The engines plugin enhances Rails&amp;#8217; own plugin framework, making it simple to share controllers, helpers, models, public, assets, routes and migrations in plugins&amp;#8221;.&lt;/p&gt;
&lt;p&gt;In a nutshell, you get to create slices of apps as plugins which makes it a piece of cake to to share common functionality between multiple applications. In my case, I&amp;#8217;ve been able to put together several e-commerce websites with practically all the core functionality provided by a set of plugins. The beauty of it is, you can easily override views, actions, etc, in your app to make each site it&amp;#8217;s own. And when you fix a bug, or add a new feature, all the sites can benefit!&lt;/p&gt;
&lt;h2&gt;What comes next?&lt;/h2&gt;
&lt;p&gt;It&amp;#8217;s still early days and it&amp;#8217;s not yet clear just how much of this is getting rolled into Rails, but James has &lt;a href=&quot;http://www.ruby-forum.com/topic/171872#753531&quot;&gt;hinted&lt;/a&gt; that much will make it across, including migrations, routes and asset management.&lt;/p&gt;
&lt;p&gt;In the mean time, if you want to see what all the fuss is about, check out &lt;a href=&quot;http://github.com/lazyatom/engines/tree/master&quot;&gt;the engines plugin&lt;/a&gt; which, thanks to the hard work of everyone involved, now runs happily on Rails 2.2!&lt;/p&gt;
&lt;h2&gt;Update&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;http://github.com/rails/rails/commit/40b40c487040d9c721d486e8ec8cfbc53a8cd79a&quot;&gt;commits&lt;/a&gt; are &lt;a href=&quot;http://github.com/rails/rails/commit/4999d52e08a02ebba344f6c318f0af4b5b18f0e5&quot;&gt;coming&lt;/a&gt; thick and fast now. I&amp;#8217;m certainly looking forward to road testing these new feature as they take shape.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Rails and git submodules can play nice</title>
   <link href="http://tekin.co.uk/2008/08/rails-and-git-submodules-can-play-nice"/>
   <updated>2008-08-11T00:00:00+01:00</updated>
   <id>http://tekin.co.uk/2008/08/rails-and-git-submodules-can-play-nice</id>
   <content type="html">&lt;p&gt;I use git submodules to track plugins that I have under active development. This way, I can make changes to the main repository as well as the plugins with minimum fuss. There&amp;#8217;s &lt;a href=&quot;http://git.or.cz/gitwiki/GitSubmoduleTutorial&quot;&gt;a great tutorial on working with submodules&lt;/a&gt;, which includes a couple of gotchas that may explain why submodules have got such a bad rep from some quarters.&lt;/p&gt;
&lt;h2&gt;Gotcha No. 1 &amp;#8211; Always commit changes in your submodules before commiting your main repository&lt;/h2&gt;
&lt;p&gt;If you make any changes to a submodule, be sure to commit and publish these changes &lt;strong&gt;before&lt;/strong&gt; you commit anything in the main repository, otherwise you and others will have issues trying to clone the repository.&lt;/p&gt;
&lt;h2&gt;Gotcha No 2 &amp;#8211; Check you&amp;#8217;re on a branch before making changes&lt;/h2&gt;
&lt;p&gt;If you are cloning a repo with a submodule and run git submodule init/update, be aware that the submodule has been checked out at a specific commit as apposed to the head of a branch meaning you have to checkout a branch before you make any changes.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Passenger/mod_rails 2.0 RC1</title>
   <link href="http://tekin.co.uk/2008/06/passenger-mod_rails-2-0-rc1"/>
   <updated>2008-06-12T00:00:00+01:00</updated>
   <id>http://tekin.co.uk/2008/06/passenger-mod_rails-2-0-rc1</id>
   <content type="html">&lt;p&gt;The guys at &lt;a href=&quot;http://blog.phusion.nl&quot;&gt;Phusion&lt;/a&gt; have been hard at work improving mod_rails and a &lt;a href=&quot;http://blog.phusion.nl/2008/06/09/phusion-passenger-20-rc-1-and-ruby-enterprise-edition-released&quot;&gt;release candidate&lt;/a&gt; for 2.0 is now available. This includes: rack support; faster graceful restarts; less memory usage; fair load balancing; upload buffering; better stability and much more. Upgrade now for an instant win!&lt;/p&gt;
&lt;p&gt;Update: if you have problems installing from the gem, get the &lt;a href=&quot;http://github.com/FooBarWidget/passenger/tree/master&quot;&gt;latest version from github&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>mod_rails and apache on OS X Leopard</title>
   <link href="http://tekin.co.uk/2008/06/mod_rails-and-apache-on-os-x-leopard"/>
   <updated>2008-06-02T00:00:00+01:00</updated>
   <id>http://tekin.co.uk/2008/06/mod_rails-and-apache-on-os-x-leopard</id>
   <content type="html">&lt;p&gt;I was going to write up my experience rolling mod_rails on the default install of Apache to tidy up my development environment, but someone &lt;a href=&quot;http://napkin.highgroove.com/articles/2008/05/27/development-with-rails-passenger-aka-mod_rails-on-mac&quot;&gt;beat me to it&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s only one thing I did differently &amp;#8211; I like to keep my apps in the Sites folder to keep things tidy &amp;#8211; so in the spirit of keeping things &lt;span class=&quot;caps&quot;&gt;DRY&lt;/span&gt; I won&amp;#8217;t duplicate an already &lt;a href=&quot;http://napkin.highgroove.com/articles/2008/05/27/development-with-rails-passenger-aka-mod_rails-on-mac&quot;&gt;good write-up&lt;/a&gt;, but I will add a couple of points that caught me out.&lt;/p&gt;
&lt;h2&gt;Apache 2 and NameVirtualHost&lt;/h2&gt;
&lt;p&gt;If you find that Apache will only serve up the first of your virtual hosts, check you&amp;#8217;ve &lt;a href=&quot;http://alexking.org/blog/2007/11/01/apache-2-only-serves-first-virtual-host&quot;&gt;correctly specified the NameVirtualHost directive&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Beware, FileVault and permissions&lt;/h2&gt;
&lt;p&gt;If you&amp;#8217;re running FileVault, you might have a &lt;a href=&quot;http://blog.phpguy.org/2008/04/26/apple-filevault-and-apache-http-server&quot;&gt;bit of fiddling to do with your file permissions&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Rails plugins and the move to gems</title>
   <link href="http://tekin.co.uk/2008/05/rails-plugins-and-the-move-to-gems"/>
   <updated>2008-05-31T00:00:00+01:00</updated>
   <id>http://tekin.co.uk/2008/05/rails-plugins-and-the-move-to-gems</id>
   <content type="html">&lt;p&gt;This week, I made my first &lt;a href=&quot;http://github.com/rails/rails/commit/1b0654ea41d15552c19f767570d4f551d617e742&quot;&gt;contribution to core&lt;/a&gt; which made installing plugins from git repositories over ssh work. It was a pretty small, mangy little patch &amp;#8211; nothing more than fixing a typo in the end &amp;#8211; but it felt good giving something back to a framework that has given me so much.&lt;/p&gt;
&lt;p&gt;Now that I&amp;#8217;m newly freelance, I&amp;#8217;m hoping to be able to spend more time giving back to the Rails ecosystem, and the first port of call might have to be the plugin management system. I know plugins are becoming decidedly unfashionable with a lot of &lt;a href=&quot;http://blog.jayfields.com/2006/12/rails-plugins-why.html&quot;&gt;smart people saying&lt;/a&gt; they you should be &lt;a href=&quot;http://nubyonrails.com/articles/tutorial-publishing-rubygems-with-hoe&quot;&gt;using gems instead&lt;/a&gt;. And with the &lt;a href=&quot;http://github.com/rails/rails/commit/088ef182e3006294b8f0e9b185d272a777c4437a&quot;&gt;recent additions&lt;/a&gt; to rails this makes even more sense and you really should be removing those plugins from your apps in favour of loading them as gem dependencies. But in some scenarios, a plugin is all that will do.&lt;/p&gt;
&lt;p&gt;In my case, I make use of the &lt;a href=&quot;http://rails-engines.org&quot;&gt;engines plugin&lt;/a&gt; (another unfashionable and often misunderstood bit of rails goodness) to share common application structure between a few apps, and here the whole plugin-as-gem thing just doesn&amp;#8217;t fit.&lt;/p&gt;
&lt;p&gt;Having been underwhelmed with the Piston equivalents for git, I&amp;#8217;ve found myself using ./script/plugin install again, and although this now works with git repositories, ./script/plugin update doesn&amp;#8217;t. Can it be that hard? Time to find out&amp;#8230;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>My blog is born</title>
   <link href="http://tekin.co.uk/2008/05/my-blog-is-born"/>
   <updated>2008-05-27T00:00:00+01:00</updated>
   <id>http://tekin.co.uk/2008/05/my-blog-is-born</id>
   <content type="html">&lt;p&gt;Finally after much twiddling with WordPress themes (so glad I don’t work with php anymore) here is my new blog! Because every freelance Rails developer worth his salt needs a blog, right!?&lt;/p&gt;
&lt;p&gt;Thanks to &lt;a href=&quot;http://www.sofiski.com&quot;&gt;Sophie&lt;/a&gt; for the great design. Now all I need is some actual content…&lt;/p&gt;</content>
 </entry>
 
 
</feed>