phcdevworks_mailer_form 0.0.1b → 0.0.2b

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
  SHA256:
3
- metadata.gz: 895180628f19a01ca64bdd677dbe523a735409ee800cbe5bcd706bb19f627cbf
4
- data.tar.gz: db0ba33dd238e8582f183fee40fd6116eb6c4fb06da67db0c5d0616a9cdfac16
3
+ metadata.gz: 9e031affc87b9375d37e36da05a1326b785734eb4d8fe2320ee95b15ddfef5a6
4
+ data.tar.gz: d6e01de75a31ae92772d32f962c266819c72783db29af850d4c228baa6ee1d35
5
5
  SHA512:
6
- metadata.gz: b3a50e24fa2063aef78796a35c62de1b73522f4d76f3c9ee1a177a08e47ee135fbbbfb9970ac40cd6dca598f4df6c331fe3810e6722e3c08dc25a31cba29dfa7
7
- data.tar.gz: 1181d6e36a0afd2368fc7bec2029857363f07373f1163504872aa5b4fbd7843f401ec50f09588d4e54372e4c01681a260e9709fd06ab392b1dca183777558bca
6
+ metadata.gz: 542f4c459c0ab5f0d546093005066aee163005812afacc0f7f9ab250bbb6be7bc993f1d3849a00ca54eeee2af74707f0314153ca56e6def1bf9234142633f9b6
7
+ data.tar.gz: 42c52f432e4f1ef5e6a1aa0396a8dfd3112747966854d28e52c73846fb144275f32c2b0a40e5beb31ac951b2ef2aa431d638db07b10a0a888c82a487f2bf5334
@@ -3,17 +3,16 @@ require_dependency "phcdevworks_mailer_form/application_controller"
3
3
  module PhcdevworksMailerForm
4
4
  class Website::PagesController < ApplicationController
5
5
 
6
- # Filters
7
- before_action :contact_params, only: [:create]
6
+
8
7
 
9
8
  # Page - Form - Contact
10
9
  def contact
11
- @contact = ContactForm.new
10
+ @contact = FormMailers.new
12
11
  end
13
12
 
14
13
  # Send Contact Email
15
14
  def create
16
- @contact = ContactForm.new(params[:contact_form])
15
+ @contact = FormMailers.new(params[:contact_form])
17
16
  @contact.request = request
18
17
  if @contact.deliver
19
18
  flash.now[:notice] = 'Thank You Message Sent!'
@@ -1,5 +1,6 @@
1
- class Form::Mailers < MailForm::Base
1
+ class FormMailers < MailForm::Base
2
2
 
3
+ # Mailer Fields
3
4
  attributes :mailer_name, :validate => true
4
5
  attributes :mailer_email, :validate => /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
5
6
  attributes :mailer_department
@@ -7,6 +8,7 @@ class Form::Mailers < MailForm::Base
7
8
  attributes :mailer_message
8
9
  attribute :mailer_captcha, :captcha => true
9
10
 
11
+ # Mailer Header
10
12
  def headers
11
13
  {
12
14
  :subject => "Website Contact",
@@ -1 +1 @@
1
- <%= render "forms/form_contact" %>
1
+ <%= render "phcdevworks_mailer_form/website/pages/forms/form_contact" %>
@@ -1,4 +1,4 @@
1
- <%= form_for @contact, url: website_pages_path do |f| %>
1
+ <%= form_for @contact, url: contact_us_path do |f| %>
2
2
 
3
3
  <div class="form-group">
4
4
  <%= f.text_field :mailer_name, required: true, class: "form-control", placeholder: "Your Name" %>
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
 
23
23
  <div class="actions">
24
- <%= form.submit class: "btn btn-primary" %>
24
+ <%= f.submit class: "btn btn-primary" %>
25
25
  </div>
26
26
 
27
27
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksMailerForm
2
- VERSION = '0.0.1b'
2
+ VERSION = '0.0.2b'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_mailer_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1b
4
+ version: 0.0.2b
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
@@ -303,7 +303,7 @@ files:
303
303
  - app/jobs/phcdevworks_mailer_form/application_job.rb
304
304
  - app/mailers/phcdevworks_mailer_form/application_mailer.rb
305
305
  - app/models/phcdevworks_mailer_form/application_record.rb
306
- - app/models/phcdevworks_mailer_form/form/mailers.rb
306
+ - app/models/phcdevworks_mailer_form/form_mailers.rb
307
307
  - app/views/layouts/phcdevworks_mailer_form/application.html.erb
308
308
  - app/views/phcdevworks_mailer_form/website/pages/contact.html.erb
309
309
  - app/views/phcdevworks_mailer_form/website/pages/forms/_form_contact.html.erb