Skip to content

Instantly share code, notes, and snippets.

@abevoelker
Created December 16, 2011 20:56
Show Gist options
  • Save abevoelker/1487933 to your computer and use it in GitHub Desktop.
Save abevoelker/1487933 to your computer and use it in GitHub Desktop.
DataMapper equivalent to ActiveRecord attribute_names
module DataMapper::Model
def property_names
properties.map { |m| m.name.to_s }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment