refinerycms-contacts 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,18 @@ module Refinery
|
|
8
8
|
acts_as_indexed :fields => [:mail]
|
9
9
|
|
10
10
|
validates_format_of :mail, :with => /.+@.+\..+/i , :allow_blank => false
|
11
|
+
|
12
|
+
def self.obfuscated
|
13
|
+
self.all.each do |m|
|
14
|
+
m.mail = self.to_decimal_entities(m.mail).html_safe
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
def self.to_decimal_entities(string)
|
20
|
+
string.each_char.collect {|char| "&##{char.unpack('U')[0]};" }.join
|
21
|
+
end
|
22
|
+
|
11
23
|
end
|
12
24
|
end
|
13
25
|
end
|
@@ -6,10 +6,9 @@
|
|
6
6
|
<%= render 'refinery/contacts/contacts/success_info' %>
|
7
7
|
<%= render 'refinery/contacts/contacts/error_info' %>
|
8
8
|
|
9
|
-
|
10
9
|
<div class="field ">
|
11
10
|
<%= f.label :recipient_id %>
|
12
|
-
<%= f.collection_select :recipient_id, @page.mails, :id, :mail, {:prompt=> true} %>
|
11
|
+
<%= f.collection_select :recipient_id, @page.mails.obfuscated, :id, :mail, {:prompt=> true} %>
|
13
12
|
</div>
|
14
13
|
|
15
14
|
|
data/changelog.md
CHANGED
data/readme.md
CHANGED