Skip to content

Instantly share code, notes, and snippets.

@tanelsuurhans
Created March 4, 2011 09:08
Show Gist options
  • Save tanelsuurhans/854373 to your computer and use it in GitHub Desktop.
Save tanelsuurhans/854373 to your computer and use it in GitHub Desktop.
def value=(value)
write_attribute(:value, value.gsub(/<your regexp>/, ''))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment