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?)
...

Ruby 6 embarassingly ugly line m...

by chrisadams.me.uk, November 23, 2009 01:16, 3 refactorings, tagged with ruby, case, when

Hi everyone,

I'm trying ...

9c5f7685501ec87178055f41147c75c5 Talk
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...

55502f40dc8b7c769880b10874abc9d0 Talk