Created
May 13, 2014 08:52
-
-
Save RichGuk/3d1d6e2e923ebc2977b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SanitisedString < Virtus::Attribute::Object | |
primitive String | |
def coerce(value) | |
value.to_s.strip | |
end | |
end | |
attribute :email, SanitisedString |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment