Remove unused contact model (#1680)

This commit is contained in:
Andrew Cantino 2016-09-10 10:24:23 -04:00 committed by GitHub
parent c3d5380f98
commit 7550274578
2 changed files with 0 additions and 17 deletions

View file

@ -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

View file

@ -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|