tkh_content 0.9.10 → 0.9.11
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/app/controllers/contacts_controller.rb +1 -1
- data/app/mailers/contact_mailer.rb +4 -4
- data/app/models/contact.rb +2 -1
- data/app/views/tags/index.html.erb +1 -1
- data/lib/generators/tkh_content/create_or_update_locales/templates/fr.yml +2 -2
- data/lib/tkh_content/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd689ef278c0e08bc119bbaa3b4fd1062d2d0759
|
4
|
+
data.tar.gz: b343283506cf28d3a44ef361bf99e80df6cf3d8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db73b8caf2e79c91f905d5b560aab3ac5cc22a8e4bad07e0b60e2139c55960461231a89f813421f354a7594d6b8234972da5b041a4a81d0f01efdf4c9fb16daa
|
7
|
+
data.tar.gz: 069a50532188e5cf3c9b0efa20eed6d8cd4cc98ba74011f92d98af3b4a7978bacac8a10a6c94f853333d82863565b6df90713985441c74458746e907255af7d3
|
data/CHANGELOG.md
CHANGED
@@ -47,7 +47,7 @@ class ContactsController < ApplicationController
|
|
47
47
|
ContactMailer.message_from_contact_form(contact).deliver
|
48
48
|
return 'success'
|
49
49
|
rescue Exception => e
|
50
|
-
AdminMailer.rescued_exceptions(e, "Some exception occurred while trying to send
|
50
|
+
AdminMailer.rescued_exceptions(e, "Some exception occurred while trying to send to site admin a message from contact form").deliver
|
51
51
|
@exception = e
|
52
52
|
return 'exception'
|
53
53
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class ContactMailer < ActionMailer::Base
|
2
|
-
|
2
|
+
|
3
3
|
# default :from => "info@yoga.lu"
|
4
4
|
|
5
5
|
# Subject can be set in your I18n file at config/locales/en.yml
|
@@ -7,14 +7,14 @@ class ContactMailer < ActionMailer::Base
|
|
7
7
|
#
|
8
8
|
# en.user_mailer.password_reset.subject
|
9
9
|
#
|
10
|
-
def message_from_contact_form(contact)
|
10
|
+
def message_from_contact_form(contact)
|
11
11
|
@contact = contact
|
12
12
|
# FIXME - only the email addresses show up. not the names :-(
|
13
13
|
# TODO - what do to if contact_email is not set?
|
14
14
|
recipient = "#{Setting.first.try(:company_name)} <#{Setting.first.try(:contact_email)}>"
|
15
15
|
reply_to = "#{@contact.sender_name} <#{@contact.sender_email}>"
|
16
|
-
mail to: recipient,
|
17
|
-
from: "#{Setting.first.site_name} <deploy@
|
16
|
+
mail to: recipient,
|
17
|
+
from: "#{Setting.first.site_name} <deploy@mailcenter.tenthousandhours.eu>",
|
18
18
|
reply_to: reply_to,
|
19
19
|
subject: "Message from #{@contact.sender_name} via #{Setting.first.try(:site_name)} web site"
|
20
20
|
end
|
data/app/models/contact.rb
CHANGED
@@ -6,7 +6,8 @@
|
|
6
6
|
class Contact < ActiveRecord::Base
|
7
7
|
|
8
8
|
validates_presence_of :sender_name
|
9
|
-
|
9
|
+
validates_presence_of :sender_email
|
10
|
+
# validates :sender_email, :presence => true, :format => { :with => /\A([\A@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :on => :create }
|
10
11
|
validates_presence_of :body
|
11
12
|
|
12
13
|
scope :by_recent, -> { order('updated_at desc') }
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% @tags.each do |tag| %>
|
13
13
|
<tr>
|
14
14
|
<td><%= link_to ("#{tag.name} (#{tag.taggings.count})"), blog_by_tag_path(tag.name) %></td>
|
15
|
-
<td><%= link_to t('edit'), edit_tag_path(tag), class: 'btn btn-xs btn-
|
15
|
+
<td><%= link_to t('edit'), edit_tag_path(tag), class: 'btn btn-xs btn-default' %><%= link_to( t('delete'), tag, method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-xs btn-danger') if tag.taggings.count == 0 %></td>
|
16
16
|
</tr>
|
17
17
|
<% end %>
|
18
18
|
</tbody>
|
data/lib/tkh_content/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tkh_content
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swami Atma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|