Created
August 19, 2021 18:29
-
-
Save jasdeepsingh/fcc0a2c4bcc6a4174d8fb6540eed44d8 to your computer and use it in GitHub Desktop.
Equality Operator Override for Embedded Associations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [5] pry(main)> r.exclusion_rules | |
# => [#<ExclusionRule _id: 611e94fa7d8fbc102109e5cd, type: "wday", value: [1], exclusionary: true>] | |
# [6] pry(main)> r.exclusion_rules = [ExclusionRule.new(id: '611e94fa7d8fbc102109e5cd', type: 'wday', value: [2])] | |
# => [#<ExclusionRule _id: 611e94fa7d8fbc102109e5cd, type: "wday", value: [2], exclusionary: true>] | |
# [7] pry(main)> r.save | |
# => true | |
# [8] pry(main)> r.exclusion_rules | |
# => [#<ExclusionRule _id: 611e94fa7d8fbc102109e5cd, type: "wday", value: [1], exclusionary: true>] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment