Skip to content

Commit

Permalink
Include ActiveModel::Model
Browse files Browse the repository at this point in the history
This wil give us the validates method.

This was previously failing with:

An error occurred while loading ./spec/validators/phone_validator_spec.rb.
Failure/Error: validates :phone_number, phone: true
  • Loading branch information
avinhurry committed Sep 2, 2024
1 parent 50f5123 commit b6a12d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/validators/phone_validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'rails_helper'

class PhoneValidatorTest
include ActiveRecord::Validations
include ActiveModel::Model

attr_accessor :phone_number

Expand Down

0 comments on commit b6a12d9

Please sign in to comment.