summaryrefslogtreecommitdiff
path: root/users/app/models
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2013-01-20 23:41:11 -0800
committerazul <azul@riseup.net>2013-01-20 23:41:11 -0800
commited1caa740f0e58cfd5f2d908946461154db68174 (patch)
treed4481ebc868bb1169ba40f7bf9f21d984e3e0560 /users/app/models
parent168c36b578d675c99aad62a350aa68cc1b6d1316 (diff)
parentb348f9dbf3b8298e0e76bda6a9da973da25ed9bd (diff)
Merge pull request #19 from leapcode/feature/partial-refactor
more flexible email partial
Diffstat (limited to 'users/app/models')
-rw-r--r--users/app/models/email.rb5
-rw-r--r--users/app/models/local_email.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/users/app/models/email.rb b/users/app/models/email.rb
index 904acb9..6d82f2a 100644
--- a/users/app/models/email.rb
+++ b/users/app/models/email.rb
@@ -22,7 +22,12 @@ module Email
other.is_a?(Email) ? self.email == other.email : self.email == other
end
+ def to_partial_path
+ "emails/email"
+ end
+
def to_param
email
end
+
end
diff --git a/users/app/models/local_email.rb b/users/app/models/local_email.rb
index bd9dea3..69cba01 100644
--- a/users/app/models/local_email.rb
+++ b/users/app/models/local_email.rb
@@ -27,8 +27,8 @@ class LocalEmail
strip_domain_if_needed
end
- def to_partial_path
- "emails/email"
+ def to_key
+ [username]
end
protected