spina_contact_forms 0.1.01 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d8183b7b84175e64412fd88dbc160bbaf5578d5
4
- data.tar.gz: ceec22477ef8bb6cba4610d40071579a8ab20d96
3
+ metadata.gz: 271059450a3277a6d1854e61b063face82479e5f
4
+ data.tar.gz: c931c3c6b968bb44bc2e65d211f545bd2e979522
5
5
  SHA512:
6
- metadata.gz: d29f4c6e01aceba2962a826e78b2d35083e5305fa009415bc9e97c31258bdec5c1ea95216db102dc1ea660ba0434ad2b17408b830b999898ebab0b0b49ab3daa
7
- data.tar.gz: 0f024bb7dd6d99ce1695046d845cab03627267e2dbe78f6eb6326cd238f75cb820a64452218c8721628051f325fc87572ae090cbac5a4cda2456b122a5482802
6
+ metadata.gz: aaddf19354d3b2449f4d35458ddc9504de6fa49e2765a9c24a6accd33c93727060a5eb8e75530eb8661887b83e537d763806c4e449391b646e756f4c481df2cb
7
+ data.tar.gz: a15a718033f06f5a8add9a45bba5f4cbd0d30b1891741870fa92a2538d5d73b1d11182496810907899d3e328a05e5c5c1fc36731f51a1510cf4eb21704bd033c
data/README.md CHANGED
@@ -25,6 +25,9 @@ Add the following to `config/secrets.yml`
25
25
  contact_form_from_email: contact_form@yourdomain.com
26
26
  ```
27
27
 
28
+ The email will be sent to whatever current_account.email returns, so make sure an email address is saved in the database under account settings.
29
+
30
+
28
31
  Add the following to your theme's config file (config/initializers/themes/theme_name.rb)
29
32
  ```ruby
30
33
  theme.plugins = ['ContactForm']
@@ -3,7 +3,7 @@ module Spina
3
3
 
4
4
  def create
5
5
  @email_content = params.permit!.except(:utf8, :controller, :action)
6
- Spina::ContactFormMailer.send_form(@email_content).deliver_now
6
+ Spina::ContactFormMailer.send_form(@email_content, current_account.email).deliver_now
7
7
  end
8
8
  end
9
9
  end
@@ -1,11 +1,11 @@
1
1
  module Spina
2
2
  class ContactFormMailer < ActionMailer::Base
3
- default from: Rails.application.secrets
3
+ default from: Rails.application.secrets.contact_form_from_email
4
4
  layout 'mailers/spina_contact_form'
5
5
 
6
- def send_form(email_content)
6
+ def send_form(email_content, email_address)
7
7
  @email_content = email_content
8
- mail(to: 'adam@adamcooper.de', subject: 'From your Contact Form')
8
+ mail(to: email_address, subject: 'From your Contact Form')
9
9
  end
10
10
  end
11
11
  end
@@ -1 +1 @@
1
- console.log('yeah!');
1
+ $('#spina_contact_form').find("input[type=text], textarea").val("");
@@ -1,3 +1,3 @@
1
1
  module SpinaContactForms
2
- VERSION = '0.1.01'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina_contact_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.01
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooper