Forked from mrchrisadams/for_the_love_of_god_refactor_this.rb
Created
November 23, 2009 13:56
-
-
Save Jonty/241087 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def just_one_kind_of_response?(item, controller) | |
case controller | |
when 'actions' | |
if item.comments.blank? || item.suggestions.blank? | |
return true | |
end | |
when 'thoughts' | |
if item.comments.blank? || item.suggestions.blank? | |
return true | |
end | |
when 'suggestions' | |
if item.comments.blank? || item.actions.blank? | |
return true | |
end | |
end | |
return false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment