def has_just_one_kind_of_thing?(item, controller)
if (controller == 'foos' && item.widgets.blank?) || (controller == 'foos' && item.doohickeys.blank?) || (controller == 'bars' && item.widgets.blank?) || (controller == 'bars' && item.doohickeys.blank?) || (controller == 'bazes' && item.widgets.blank?) || (controller == 'bazes' && item.contraptions.blank?)
...
stuff.each do |name| name = name.downcase #size ...
Ruby ungliness and long too
by uberholden.myopenid.com,
September 10, 2009 13:15,
6 refactorings, tagged with rails, ruby, if, case, if else
any ideas on making this mo...
var search = 'foo'; var key = null; ...
JavaScript Javascript Switch Statement
help me produce better code?
public function setClass($class){
switch($class){
case "050":
...
PHP switch statement a good idea?
I'm making a switch stateme...
Hi everyone,
I'm trying ...