Skip to content

Instantly share code, notes, and snippets.

@workmad3
Created March 16, 2010 13:04
Show Gist options
  • Save workmad3/333937 to your computer and use it in GitHub Desktop.
Save workmad3/333937 to your computer and use it in GitHub Desktop.
class Status < ActiveRecord::Base
ALARM = Status.find_by_name('alarm')
NO_ALARM = Status.find_by_name('no_alarm')
...
end
Status::ALARM
=> <Status:... name="alarm">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment