Closed JanStevens closed 10 years ago
Capitalize Voucher:
with_model :Voucher do
table do |t|
t.string :ticket
end
model do
attr_accessor :validation_hash
validates :ticket, ticket: true
end
end
@nertzy Hmm, I’m not convinced that’s the issue here, though. The error would’ve been “voucher is not allowed as a constant name”. Plus we camelize it here and it’s capital-V Voucher in the error shown.
@JanStevens did changing it to :Voucher
as above fix the issue?
Yea it did fix the issue... Thanks!
Interesting.
We should do something to make this situation more discoverable through better error messaging.
Yea, I know we want to deprecate passing snake-cased symbols, but I’m still not convinced that’s the issue here.
The error they were getting doesn’t match the apparent fix, and changing several of the with_model specs to call with_model
with e.g. :blog_post
instead of :BlogPost
doesn’t raise any exceptions and is in fact completely green, so I can’t reproduce the issue.
Thats why its only a Jenkins issue, locally I didnt saw any problems using :Voucher
our :voucher
@JanStevens Are you on the latest version of with_model? (1.1.0)
yes!
It’s also odd that the error only occurs on removal, not creation. This implies that for some reason either:
with_model
blocks for the same test.
Hello,
Using jenkins on our setup we get the following errors (rake spec)
The Voucher is with_model object:
Any idea/solution? Thanks