Skip to content

Instantly share code, notes, and snippets.

@mrsimo
Created July 16, 2012 15:05
Show Gist options
  • Save mrsimo/3123203 to your computer and use it in GitHub Desktop.
Save mrsimo/3123203 to your computer and use it in GitHub Desktop.
This SCREAMS to be moved to a model -_-
def participation_options(invitation)
options = []
options << :yes if invitation.can_change_to_yes? || invitation.can_buy_tickets? || invitation.participation == :yes
options << :maybe if invitation.can_change_to_maybe? || invitation.participation == :maybe
options << :no if invitation.can_change_to_no? || invitation.participation == :no
options
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment