Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mrchrisadams/241089 to your computer and use it in GitHub Desktop.
Save mrchrisadams/241089 to your computer and use it in GitHub Desktop.
def just_one_kind_of_response?(item, controller)
case controller
when 'suggestions', 'actions'
return item.comments.blank? || item.actions.blank?
when 'thoughts'
return item.comments.blank? || item.suggestions.blank?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment