ecm_contact 1.0.2.pre → 1.0.3.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,16 +8,16 @@ module Ecm
|
|
8
8
|
attribute :terms_of_service
|
9
9
|
attribute :nickname, :captcha => true
|
10
10
|
|
11
|
-
validates :email, :format => { :with => /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i, :message => I18n.t("activerecord.errors.messages.invalid") }
|
12
|
-
validates :message, :presence => { :message => I18n.t("activerecord.errors.messages.empty") }
|
13
|
-
validates :name, :presence => { :message => I18n.t("activerecord.errors.messages.empty") }
|
14
|
-
validates :terms_of_service, :acceptance => { :message => I18n.t("activerecord.errors.messages.accepted") }
|
11
|
+
validates :email, :format => { :with => /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i }, :presence => true # , :message => Proc.new { I18n.t("activerecord.errors.messages.invalid") }.call }
|
12
|
+
validates :message, :presence => true # { :message => Proc.new { I18n.t("activerecord.errors.messages.empty") }.call }
|
13
|
+
validates :name, :presence => true # { :message => Proc.new { I18n.t("activerecord.errors.messages.empty") }.call }
|
14
|
+
validates :terms_of_service, :acceptance => true # { :message => Proc.new { I18n.t("activerecord.errors.messages.accepted") }.call }
|
15
15
|
|
16
16
|
# Declare the e-mail headers. It accepts anything the mail method
|
17
17
|
# in ActionMailer accepts.
|
18
18
|
def headers
|
19
19
|
{
|
20
|
-
:subject => I18n.t('ecm.contact.request.subject', :application_name => Rails.application.class.to_s.split("::").first),
|
20
|
+
:subject => Proc.new { I18n.t('ecm.contact.request.subject', :application_name => Rails.application.class.to_s.split("::").first) }.call,
|
21
21
|
# :to => I18n.t('ecm.contact.request.recipients'),
|
22
22
|
:to => Ecm::Contact::Configuration.recipients[Rails.env],
|
23
23
|
:from => %("#{name}" <#{email}>)
|
data/lib/ecm/contact/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_contact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 961915992
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
9
|
+
- 3
|
10
10
|
- pre
|
11
|
-
version: 1.0.
|
11
|
+
version: 1.0.3.pre
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Roberto Vasquez Angel
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-
|
19
|
+
date: 2012-09-24 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rails
|
@@ -287,3 +287,4 @@ specification_version: 3
|
|
287
287
|
summary: Basic contact form.
|
288
288
|
test_files: []
|
289
289
|
|
290
|
+
has_rdoc:
|