Posts Tagged ‘Ruby on Rails’

Ruby on Rails Best Coding Practices Slide Show and Gem

Posted on the November 17th, 2009 under Ruby on Rails by

When browsing around today I saw quite a few sites talking about the Rails Best Practices presentation / talk that ihower did at the Kungfu RailsConf. Check it below, it really covers a lot of basic tips on how to clean up your code and follow some better coding practices.

Someone just released a gem that will analyze your code and check for “Best Practices” –  seems promising. Check it out at GitHub here:

Quick Ruby On Rails Tip for Nested Resources

Posted on the November 1st, 2008 under My Projects,Remodeling,Ruby on Rails by

Just a quick tip for when you are doing nested resources….

In this example, I am building a app for a client where there is a recipient and they have many physicians. So I have a case where I have a nested resource. To keep thing DRY, I added this to my before filter where I get the recipient. This allows you to nuke the find in the show, edit, update and delete actions and retain the original use of @physician.

def get_recipient
  @recipient = Recipient.find(params[:recipient_id])
  # DRYs her up a little so you don't have a find in the show,edit,update and delete actions	
  @physician = @recipient.physicians.find(params[:id]) if params[:id]

Don’t forget to modify your index find, change it to reflect the nested route… In my case:

    @physicians = @recipient.physicians.find(:all)

Have any other useful tips? Let me know!

Rails Rumble 2008 App List

Posted on the October 19th, 2008 under programming,Ruby on Rails by

Put together a small list of apps I saw today that are part of the Rails Rumble 2008.

Let me know if I missed any by adding a comment.  Check out – I am sure they will post an official list shortly.

*** The list keeps growing! – Car pooling site – Music artist tracking site, shows latest ablums from artists you like. – Conference organization? – A service that finds the right food for you? – Social language learning – Simple presentations – RSS / Webservices to speach – Political news? – Organize, collect, and share your projects – Pickup game locator – A solution for managing projects from proposal, through build stage, to getting paid. – Delayed email sending? – Music Create / Sharing app – Easily integrate communication services into your app – Blogging app – A program to get your from nothing to running one mile – A social application where you list your games and connect with your friends to play games. – Unknown – A co-operative word game for two or more players – Lists of things you love and hate. – Find a car pool – Build a potato man –  task / GTD app – Web based twitter client – Hiking fan site, find trails – No idea what this is – a wall of randomness? – donation app – Treasuring hunting w/SMS – Track what you eat – online game where you can wager points on real-world events – create, publish, read and rate stories – Keeps track of your citations on books, journals and websites. – pics of your diet (food) – see all the good and bad stuff in the Twitterverse –  say who inspirse you – Lunch recommendations – provides you with tools and motivation to get you out of the red…and back in the black. – Qflip is an app that integrates with the netflix api that helps people to rent randomly. – Its a way to get help with things using your social network. -Latte Art with ratings – An idea incubator. – a stretch reminder – RubyReddo is a service to translate your GetText .po files – Just A F***ing List – Dense is a simple slideshop app – Effortless one-click reminder about pretty much anything – Ostraka is the digital counterpart of ancient democratic instrument of ostracism. – Tagueame is a little experiment about socializing online opinions about your friends and family. – A business related app for project management, time reporting, invoicing with built in chat rooms. – find out who’s got the best prices, and where they are – A service for tracking and sharing debts with friends – The assassin game

Another great list of Rails Rumble 2008 apps  – > – Reveal the Bias