Skip to content

Instantly share code, notes, and snippets.

@tatat
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tatat/11364385 to your computer and use it in GitHub Desktop.
Save tatat/11364385 to your computer and use it in GitHub Desktop.
こういうのやりたい
class Parent
enumerize :nyan, in: [:a, :b, :c], scope: true
end
class Child1 < Parent
enumerize :nyan, in: [:a], default: :a
end
class Child2 < Parent
enumerize :nyan, in: [:a, :b], default: :b
end
class Child3 < Parent
enumerize :nyan, in: [:a, :b, :c], default: :c
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment