ecm_contact2 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c6af65ee06f56771bfc3dd58bfa04bb7eae5375
4
- data.tar.gz: 9a4f2401c953c1f73e163024df817a0a7f8330a7
3
+ metadata.gz: 0b21f9c40a67d16e198bde07233bbe654877f47f
4
+ data.tar.gz: 170731c1bef3497718826c1cfdbf54792928c0b1
5
5
  SHA512:
6
- metadata.gz: 7f1b4f78df08e6651ba0346d9e55320faa989a6be88655255f66d93386ac8265642dd1629efe6224a49debe12c2357dbaf2793aaadf34c275529c1253a45837b
7
- data.tar.gz: 0c02bfca663191fec62c1b66a0b15f7d47792c1e25179e51f398d7a35f5e5c741cdc241889b01cdc670af6a8e93004fe87923cb62e6d5755c17ce8e93b5809f6
6
+ metadata.gz: 290355612788ec2f6f537ab88d87d2051819ec821819c2d9df3cf42856563ee24bb5c37ca09230f26db63ffdf848e631f31a7bb75cf4557b76b1770b93ac1994
7
+ data.tar.gz: 2b58fe34085a24b3899a87685310337526a896c2b4363010d0ba2096fecc63d58771cdd0ff9a7780f45e263f6f90811d4711d3c1e7798c697f91dcaf1f6b2b20
@@ -8,7 +8,7 @@ module Ecm
8
8
 
9
9
  def create
10
10
  @title = I18n.t('ecm.contact.request.index.title')
11
- @contact_request = ContactRequest.new(params[:contact_request])
11
+ @contact_request = ContactRequest.new(permitted_params)
12
12
 
13
13
  if @contact_request.deliver
14
14
  redirect_to(after_create_url, notice: -> { I18n.t('ecm.contact.form.messages.delivered') }.call)
@@ -19,6 +19,10 @@ module Ecm
19
19
 
20
20
  private
21
21
 
22
+ def permitted_params
23
+ params.require(:contact_request).permit(:nickname, :name, :email, :phone, :message, :terms_of_service)
24
+ end
25
+
22
26
  def after_create_url
23
27
  Ecm::Contact::Configuration.after_create_url.call(self)
24
28
  end
@@ -1,7 +1,8 @@
1
1
  <h4 style="text-decoration:underline"><%= message.subject %></h4>
2
2
 
3
- <% @resource.mail_attributes.each do |attribute, value|
4
- next if value.blank? %>
3
+ <% @resource.mail_attributes.each do |attribute| %>
4
+ <% value = @resource.send(attribute) %>
5
+ <% next if value.blank? %>
5
6
 
6
7
  <p><b><%= @resource.class.human_attribute_name(attribute) %>:</b>
7
8
  <%= case value
@@ -9,10 +9,11 @@ de:
9
9
  page_title: Kontaktanfrage
10
10
  meta_description: Kontaktieren Sie uns über unser Kontaktformular
11
11
  title: Kontaktanfrage
12
- subject: "[%{application_name}] Neue Kontaktanfrage"
13
12
  contact_requests:
14
13
  form:
15
14
  submit: Abschicken
15
+ request:
16
+ subject: "[%{application_name}] Neue Kontaktanfrage"
16
17
  views:
17
18
  actions:
18
19
  back: 'Zurück'
@@ -9,10 +9,11 @@ en:
9
9
  page_title: Contact request
10
10
  meta_description: Contact us
11
11
  title: Contact request
12
- subject: "[%{application_name}] New contact request"
13
12
  contact_requests:
14
13
  form:
15
14
  submit: Submit
15
+ request:
16
+ subject: "[%{application_name}] New contact request"
16
17
  views:
17
18
  actions:
18
19
  back: 'Back'
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Contact
3
- VERSION = '4.0.1'.freeze
3
+ VERSION = '4.0.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_contact2
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-15 00:00:00.000000000 Z
11
+ date: 2017-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails