Syntax checker does not always recognize an Array.

I have a piece of code:

      @subbs = SubBundle.find_all_by_hashapprox(sub_bundle.hashapprox)
      next if @subbs.length == 1
      @subbs.each { |subb|

The SubBundle.find_all_by_hashapprox(..) creates an Array of SubBundles.

However, the syntax checker in the editor doesn't like the @subbs.length or the @subbs.each.
It says it cannot find length and each for type Array of SubBundles and gives me two yellow flags on the right side.

The code runs fine, just the syntax checker needs a tweek.

The syntax checker feature usually does a great job - and I am beginning to depend on it.

2 comments
Comment actions Permalink

Hello Bob,

What Rails version do you use? Please ensure that Rails gems are attached to your project.
Are there any errors shown on these lines of code?

Regards,
Oleg

0
Comment actions Permalink

See attached RubyGems environment screenshot..

The RubyMine version is 3.1 #RM-103-105



Attachment(s):
Screenshot-RubyGems Environment.png
0

Please sign in to leave a comment.