Sha256: 8dc69fe1d7c3e909b9c3ab3ef81ddca632a4ca013fb5492a221af1a449c0facb

Contents?: true

Size: 444 Bytes

Versions: 20

Compression:

Stored size: 444 Bytes

Contents

class NonValidatedIssue < ActiveRecord::Base
  belongs_to :person

  validates_presence_of :subject
  validate :dummy_validation

  def validation_log
    @validation_log ||= []
  end

  def log(validation_line)
    validation_log << validation_line
    validation_log
  end

  def dummy_validation
    if new_record?
      log("Validating new non validated issue")
    else
      log("Validating non validated issue #{id}")
    end
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
deferring-0.8.2 spec/support/models/non_validated_issue.rb
deferring-0.8.1 spec/support/models/non_validated_issue.rb
deferring-0.8.0 spec/support/models/non_validated_issue.rb
deferring-0.7.1 spec/support/models/non_validated_issue.rb
deferring-0.7.0 spec/support/models/non_validated_issue.rb
deferring-0.6.2 spec/support/models/non_validated_issue.rb
deferring-0.6.1 spec/support/models/non_validated_issue.rb
deferring-0.6.0 spec/support/models/non_validated_issue.rb
deferring-0.5.0 spec/support/models/non_validated_issue.rb
deferring-0.4.1 spec/support/models/non_validated_issue.rb
deferring-0.4.0 spec/support/models/non_validated_issue.rb
deferring-0.3.0 spec/support/models/non_validated_issue.rb
deferring-0.2.1 spec/support/models/non_validated_issue.rb
deferring-0.2.0 spec/support/models/non_validated_issue.rb
deferring-0.1.5 spec/support/models/non_validated_issue.rb
deferring-0.1.4 spec/support/models/non_validated_issue.rb
deferring-0.1.3 spec/support/models/non_validated_issue.rb
deferring-0.1.2 spec/support/models/non_validated_issue.rb
deferring-0.1.1 spec/support/models/non_validated_issue.rb
deferring-0.1.0 spec/support/models/non_validated_issue.rb