Skip to content

Instantly share code, notes, and snippets.

@MikeSilvis
Created May 8, 2012 03:45
Show Gist options
  • Save MikeSilvis/2632390 to your computer and use it in GitHub Desktop.
Save MikeSilvis/2632390 to your computer and use it in GitHub Desktop.
next_status
def next_status
next_status = {
"pending" => :cancel,
"shipped" => :return,
"paid" => :ship
}
if next_status["#{self.status.name}"]
send(next_status["#{self.status.name}"])
end
self.save
end
@j3j3
Copy link

j3j3 commented May 16, 2012

What an amazing gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment