Skip to content

Instantly share code, notes, and snippets.

@imajes
Created July 15, 2010 15:25
Show Gist options
  • Save imajes/477106 to your computer and use it in GitHub Desktop.
Save imajes/477106 to your computer and use it in GitHub Desktop.
def mark_as(state, item)
begin
sm.state = :state.to_s
sm.save!
rescue
@logger.warn "Invalid State change attempt for #{item.class.to_s}"
end
sm.reload
sm
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment