Inspections complains about one particular fieldname in table. ('cannot find x for type y')
For some reason, RubyMine is reporting that a defined column cannot be found.
I have tried Invalidate Cache & Restart. The code does work properly. The inspector does not complain about other columns on the table if I substitute in the same place. Vendibles::Type.columns.map {|x| x.name} includes "is_property".
This is one of a few similar inspection glitches that I'm having, that are preventing an aggressive code-warning cleanup, so any ideas would be appreciated - although I suspect it's a RubyMine inspections bug... Maybe using 'is_' as a column-name prefix is 'bad' for some reason?
2017.1.4 EAP but fairly sure it's been the same since 2017.1

(nb: It could be STI related, but then I'd expect to see the same for e.g. type.handle. The inheritance_column is set to type_id and the sti index functions are over-ridden to use the Type table... It all works very nicely so RubyMine ought not to be concerned...)
(nb2: also tried is_property? as it is a boolean - no difference)
请先登录再写评论。
Perhaps related: In the Vendibles::Type model that describes the 'type' is the above example, there are RubyMine inspection warnings on columns of this table that do not warn in other contexts.
Specifically, in the model,
... displays 'expected DB field name of table' for both 'handle' and 'code', even though both are native DB columns of vendible_types ('vendible_' is set as the table_name_prefix for the Vendibles namespace). Again - the code works fine, all the references are properly resolved at runtime. But I would really like to resolve the warnings without suppressing them.
For what it's worth,
does not display an inspection warning, but then neither does:
which defeats the point somewhat...
Hello Justin,
sorry for the delay. That appears to be a known problem https://youtrack.jetbrains.com/issue/RUBY-18483
Could you please take a look? In case you find it related please vote for it.