/error.txt Secret
Created
July 23, 2020 23:09
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
block in <module:ItemWithCustomAttributes>': undefined method `field' for #<Module:0x00007fd40bac0198> (NoMethodError) |
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
class Item | |
include Mongoid::Document | |
field :foo, type: String | |
end |
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
module ItemWithCustomAttributes | |
refine Item do | |
field :bar, type: String | |
end | |
end | |
class Test < ActiveSupport::TestCase | |
using ItemWithCustomAttributes # blows up right here attempting to use the refinement | |
def test_additional_validation | |
Item.new(foo: 'foo', bar: 'bar') # this is what i want to do | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment