Skip to content

Instantly share code, notes, and snippets.

@jpowers
Created September 21, 2010 20:53
Show Gist options
  • Select an option

  • Save jpowers/590519 to your computer and use it in GitHub Desktop.

Select an option

Save jpowers/590519 to your computer and use it in GitHub Desktop.
class ContainerLabel < ActiveRecord::Base
aasm_column :state
aasm_initial_state :undownloaded
aasm_state :undownloaded
aasm_state :downloaded
aasm_event :download do
transitions :to => :downloaded, :from => :undownloaded
end
def download
puts "DOWNLOAD"
end
end
cl = ContainerLabel.new
cl.download
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment