mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Remove unused contact model (#1680)
This commit is contained in:
parent
c3d5380f98
commit
7550274578
2 changed files with 0 additions and 17 deletions
|
@ -1,15 +0,0 @@
|
|||
# Contacts are used only for the contact form on the Huginn website. If you host a public Huginn instance, you can use
|
||||
# these to receive messages from visitors.
|
||||
|
||||
class Contact < ActiveRecord::Base
|
||||
attr_accessible :email, :message, :name
|
||||
|
||||
validates_format_of :email, :with => /\A[A-Z0-9._%+-]+@[A-Z0-9.-]+\.(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\Z/i
|
||||
validates_presence_of :name, :message
|
||||
|
||||
after_create :send_contact
|
||||
|
||||
def send_contact
|
||||
ContactMailer.send_contact(self).deliver
|
||||
end
|
||||
end
|
|
@ -3,7 +3,6 @@ class SetCharsetForMysql < ActiveRecord::Migration
|
|||
@all_models ||= [
|
||||
Agent,
|
||||
AgentLog,
|
||||
Contact,
|
||||
Event,
|
||||
Link,
|
||||
Scenario,
|
||||
|
@ -23,7 +22,6 @@ class SetCharsetForMysql < ActiveRecord::Migration
|
|||
all_models.each { |model|
|
||||
table_name = model.table_name
|
||||
|
||||
# `contacts` may not exist
|
||||
next unless connection.table_exists? table_name
|
||||
|
||||
model.columns.each { |column|
|
||||
|
|
Loading…
Add table
Reference in a new issue