From 24c1f357b6011461f6848789fd8c2850f127c945 Mon Sep 17 00:00:00 2001 From: Andrew Cantino Date: Sat, 10 Sep 2016 09:22:46 -0400 Subject: [PATCH] Remove unused contact model --- app/models/contact.rb | 15 --------------- .../20140813110107_set_charset_for_mysql.rb | 2 -- 2 files changed, 17 deletions(-) delete mode 100644 app/models/contact.rb diff --git a/app/models/contact.rb b/app/models/contact.rb deleted file mode 100644 index 5928ec708b..0000000000 --- a/app/models/contact.rb +++ /dev/null @@ -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 \ No newline at end of file diff --git a/db/migrate/20140813110107_set_charset_for_mysql.rb b/db/migrate/20140813110107_set_charset_for_mysql.rb index 90c55b3466..1f98f9804e 100644 --- a/db/migrate/20140813110107_set_charset_for_mysql.rb +++ b/db/migrate/20140813110107_set_charset_for_mysql.rb @@ -3,7 +3,6 @@ def all_models @all_models ||= [ Agent, AgentLog, - Contact, Event, Link, Scenario, @@ -23,7 +22,6 @@ def change all_models.each { |model| table_name = model.table_name - # `contacts` may not exist next unless connection.table_exists? table_name model.columns.each { |column|