summaryrefslogtreecommitdiff
path: root/users/app/models/email.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-07-18 12:12:07 +0200
committerAzul <azul@leap.se>2013-07-24 10:55:50 +0200
commitcc96c60c4617c09379d5e1ddbefa42407329c19a (patch)
tree1f51c6a1c76ca283c9ddafe6b5d940fe2fe29ea4 /users/app/models/email.rb
parent4a071ef1b33525fa2d1052aa7f21b549447fe767 (diff)
testing all versions of emial identities, emails are now strings
Diffstat (limited to 'users/app/models/email.rb')
-rw-r--r--users/app/models/email.rb21
1 files changed, 4 insertions, 17 deletions
diff --git a/users/app/models/email.rb b/users/app/models/email.rb
index 6d82f2a..90fc645 100644
--- a/users/app/models/email.rb
+++ b/users/app/models/email.rb
@@ -1,6 +1,5 @@
-module Email
- extend ActiveSupport::Concern
-
+class Email < String
+=begin
included do
validates :email,
:format => {
@@ -8,26 +7,14 @@ module Email
:message => "needs to be a valid email address"
}
end
-
- def initialize(attributes = nil, &block)
- attributes = {:email => attributes} if attributes.is_a? String
- super(attributes, &block)
- end
-
- def to_s
- email
- end
-
- def ==(other)
- other.is_a?(Email) ? self.email == other.email : self.email == other
- end
+=end
def to_partial_path
"emails/email"
end
def to_param
- email
+ to_s
end
end