Skip to content

Instantly share code, notes, and snippets.

@rtirrell
Created June 29, 2010 01:05
Show Gist options
  • Select an option

  • Save rtirrell/456639 to your computer and use it in GitHub Desktop.

Select an option

Save rtirrell/456639 to your computer and use it in GitHub Desktop.
field_naming_convention = lambda do |v|
if v.name.to_s[0..0] == v.name[0..0].to_s.upcase
DataMapper::NamingConventions::Field::Underscored(v)
else
v.name.to_s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment