Skip to content

Instantly share code, notes, and snippets.

@stevencwarren
Created September 7, 2012 03:17
Show Gist options
  • Select an option

  • Save stevencwarren/3662784 to your computer and use it in GitHub Desktop.

Select an option

Save stevencwarren/3662784 to your computer and use it in GitHub Desktop.
def weight=(weight)
write_attribute(:weight, weight.to_d.ceil.to_i)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment