Skip to content

Instantly share code, notes, and snippets.

View rlburkes's full-sized avatar

Randy Burkes rlburkes

View GitHub Profile
class BuildPropertyAssociationsOnExports < ActiveRecord::Migration
...
class Property < ActiveRecord::Base
attr_accessible :hierarchical
def enumerated?
if defined?(super)
super
else
class RenameHierarchicalToEnumeratedInProperties < ActiveRecord::Migration
def change
rename_column(:properties, :hierarchical, :enumerated)
end
end
class BuildPropertyAssociationsOnExports < ActiveRecord::Migration
...
class Property < ActiveRecord::Base
attr_accessible :hierarchical
end
...
def up