Cannot find 'xxxxxxx' warning
I'm running Rubymine EAP 95.314 on Ubuntu and developing with Rails 3. I noticed that this code...
class Person
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Versioning
field :first_name, :type => String
field :middle_names, :type => String
field :last_name, :type => String
def full_name
first_name + ' ' +
(!middle_names.blank? ? middle_names + ' ' : '') +
(!last_name.blank? ? last_name : '')
end
end
... gives 'cannot find' warnings for first_name, middle_names and last_name in the full_name method, however the code seems to work. I'n new to all this so I'm wondering if I'm writing this in a non-standard way that just happens to work or if there's a problem with the RubyMine parser.
请先登录再写评论。
Hello Jerome,
RubyMine doesn't have any specific support for Mongoid, and because of that
it doesn't know about the accessors which are dynamically generated from
the 'field' declarations. You can file a feature request at http://youtrack.jetbrains.net/
asking for Mongoid support in RubyMine.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"