Skip to content

Instantly share code, notes, and snippets.

@rlburkes
Last active August 29, 2015 14:25
Show Gist options
  • Save rlburkes/fbaec508183a7bb20fe1 to your computer and use it in GitHub Desktop.
Save rlburkes/fbaec508183a7bb20fe1 to your computer and use it in GitHub Desktop.
class ProductAttribute < ActiveRecord::Base
include DiscriminableModel
uses_type_column :data_type do |data_type|
"#{data_type.to_s.camelize}ProductAttribute".safe_constantize
end
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment