Updated

app/models / feedback.rb

A
9 lines of codes
1 methods
3.2 complexity/method
10 churn
3.2 complexity
0 duplications
class Feedback < ActiveRecord::Base
  1. Feedback has no descriptive comment
validates :comment, presence: true, length: { maximum: 32768 } validates :petition_link_or_title, length: { maximum: 255 }, allow_blank: true validates :email, email: true, length: { maximum: 255 }, allow_blank: true def petition_link? petition_link_or_title =~ /\A#{Regexp.escape(Site.url)}/ end end