19 May '13, 5am

The Law of Demeter for #ruby on #rails - CodeBeerStartups

The Law of Demeter for Ruby on Rails According to the law of demeter, a model should only talk to its immediate association, don’t talk to the association’s association and association’s property, it is a case of loose coupling. Bad Smell class Invoice < ActiveRecord::Base belongs_to :user end <%= @invoice.user.name %> <%= @invoice.user.address %> <%= @invoice.user.cellphone %> In this example, invoice model calls the association(user)’s property(name, address and cellphone), which violates the law of demeter. We should add some wrapper methods. Refactor class Invoice < ActiveRecord::Base belongs_to :user delegate :name, :address, :cellphone, :to => :user, :prefix => true end <%= @invoice.user_name %> <%= @invoice.user_address %> <%= @invoice.user_cellphone %> Luckily, rails provides a helper method delegate which utilizes the DSL way to generates the wrapper methods. Besi...

Full article: http://www.codebeerstartups.com/2013/05/the-law-of-demete...

Tweets

Saturday update! Info on our instructor-led Rub...

codelesson.com 18 May '13, 9am

Format Taught online. Instructor-led. 6 units . What's a unit? A unit measures the time it takes to complete one of our in...

Senior Advisor to Obama: "The Law Is Irrelevant."

ace.mu.nu 19 May '13, 6pm

« In Wake of Gosnell Atrocities, Where are Appeals for Debate? [krakatoa] | Main | The Balls Deep Gaming thread » May 19, ...

TIL about Rails’ .to_setence method -

apidock.com 24 May '13, 4pm

Converts the array to a comma-separated sentence where the last element is joined by the connector word. Options: :words_c...

New Job Alert: Ruby on Rails developer at APN S...

simplyhired.com 19 May '13, 9am

Need RUBY on RAIL Programmer !!! Interview TODAY !!! Exclusive Req !!! Please send me your best Consultant Resume ASAP.. F...

#UK [contract] Ruby on Rails Developer at ✔ #jobs

contractjob.net 18 May '13, 11am

A Ruby on Rails Developer is urgently required to join one of the most exciting "high-buzz" start-up's in London currently...

What makes #Ruby on #Rails popular?

What makes #Ruby on #Rails popular?

articlerich.com 20 May '13, 3am

Ruby on Rails: A Perfect Tool for Web Application Development - By: Marvin Cole The developers frequently explore affordab...

#UK [contract] Ruby On Rails Developer at ✔ #jobs

contractjob.net 17 May '13, 10pm

Ruby on Rails Developer - London - 3 month initial contract - Social Media - Well funded start up - Ruby on Rails - MySQL ...

Desarrollador Senior Ruby on Rails at @Software...

jobs.hackergarage.mx 21 May '13, 10pm

Si escribir código es tu vida, estás al día en los principales lenguajes, te gusta buscar, aprender y aplicar cosas nuevas...

Vagas p/ Desenvolvedor Ruby on Rails - TpiRH - ...

pessoas.vagas.com.br 16 May '13, 9pm

Talent Group atua no segmento de Tecnologia da Informação há mais de 17 anos, seleciona profissionais com os seguintes req...

New Job Alert: Ruby on Rails Developer Wanted a...

simplyhired.com 20 May '13, 7pm

Ruby on Rails Developer Wanted Job Description: Our client is looking for a RoR (Ruby On Rails) developer to work on their...

rvmで.ruby-versionを使うようになったらpowが起動しなくなった。 #Ruby ...

qiita.com 17 May '13, 1am

You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers, you can swit...

#US [contract] Ruby on Rails Developer at ✔ #jobs

contractjob.net 16 May '13, 3pm

This well-funded digital start-up is searching for a progressive Software Engineer with broad technology experience in Rub...

#UK [contract] Ruby on Rails Developer at ✔ #jobs

contractjob.net 16 May '13, 10am

Ruby on Rails Developer - Central London - Contract - 250/350pd Leading publishing company is looking for a new Ruby on Ra...

#jobs #jobsite Ruby Developer – Ruby on Rails –...

jobcentre.uk.com 13 May '13, 12am

London, Surrey Testing Circle Ltd Ruby Developer - Ruby on Rails - Ruby - Rails - London - Up to 65k Ruby on Rails Develop...