mattbeedle/capsule_crm

View on GitHub
lib/capsule_crm/errors/record_not_saved.rb

Summary

Maintainability
A
0 mins
Test Coverage
module CapsuleCRM
  module Errors
    class RecordNotSaved < StandardError
      attr_reader :record

      def initialize(record)
        @record = record
      end

      def message
        [
          'CapsuleCRM::Errors::RecordNotSaved',
          'You cannot call create unless the parent is saved'
        ].join(': ')
      end
    end
  end
end