Updated

app/models / moderation_delay.rb

A
22 lines of codes
2 methods
3.4 complexity/method
1 churn
6.89 complexity
0 duplications
class ModerationDelay
  1. ModerationDelay has no descriptive comment
include ActiveModel::Model attr_accessor :subject, :body
  1. ModerationDelay#body is a writable attribute
  2. ModerationDelay#subject is a writable attribute
validates :subject, presence: true, length: { maximum: 100 } validates :body, presence: true, length: { maximum: 2000 } def attributes { "subject" => subject, "body" => body } end def attributes=(hash) hash = hash.stringify_keys hash.each do |key, value| if respond_to?("#{key}=")
  1. ModerationDelay#attributes= manually dispatches method call
public_send("#{key}=", value) end end end end