2016-05-04 17:42:10 +00:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: spam_logs
|
|
|
|
#
|
|
|
|
# id :integer not null, primary key
|
|
|
|
# user_id :integer
|
|
|
|
# source_ip :string
|
|
|
|
# user_agent :string
|
|
|
|
# via_api :boolean
|
|
|
|
# project_id :integer
|
|
|
|
# noteable_type :string
|
|
|
|
# title :string
|
|
|
|
# description :text
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
#
|
|
|
|
|
2016-01-09 19:30:34 +00:00
|
|
|
class SpamLog < ActiveRecord::Base
|
|
|
|
belongs_to :user
|
|
|
|
|
|
|
|
validates :user, presence: true
|
2016-01-26 21:20:01 +00:00
|
|
|
|
|
|
|
def remove_user
|
|
|
|
user.block
|
|
|
|
user.destroy
|
|
|
|
end
|
2016-01-09 19:30:34 +00:00
|
|
|
end
|