rails 3 model name conflict
i开发者_JAVA技巧 have a model called Job. In ruby core there is a module Benchmark and class within it Job.
That's make the conflict when i try to call Job.all.
Is there any possible and safe solution to resolve this without to rename my model?
Big thanks
Renaming your model is the safest way, but you can try with namespaces:
module MyModule
class Job < ActiveRecord::Base
end
end
精彩评论