Question about the Inspector not seing an Array in the Conroller
Hello,
RubyMine: 2.0.2
Rails: 2.3.5
Code: Following the Head First Rails book, page 182
I've noticed the inspector fail to find an object a couple of times. I was just curious if there's something I don't understand or a way to force the inspector to see what it's missing? While inside the "find" method of the "client_workouts" controller, RubyMine does understand what the associated view is so I'm not seeing why the inspector doesn't pick up on the "@client_workouts" object in the Find method.
Thanks!

请先登录再写评论。
Reno,
Could you try our RubyMine 3.0 RC (see http://blogs.jetbrains.com/ruby/2010/11/rubymine-3-0-release-candidate-—-last-minute-little-fixes/) ? Stable RubyMine 2.0.2 is quite out of date.
Hi Roman,
The Code Inspector in 3.0 (analyzing the project from scratch on startup) has the same issue (screenshots would look identical). I also tried creating a new global variable in the Find method of the controller. In the find view, the code inspector didn't recognize the new global variable either. I'm still pretty new to Rails so pardon me if I'm doing something stupid. I attached a zipped copy of the project if it helps.
Controller: \client_workouts\app\controllers\client_workouts_controller.rb
Controller Method: find
View: \client_workouts\app\views\client_workouts\find.html.erb
Variable in the find view not being seen as existing by the Inspector: @client_workouts
Thanks!
Attachment(s):
client_workouts.zip
Reno,
It's because you defined 2 methods "find"
due to some bug RubyMine scans for defined instance variable only in first declaration but obviously the second method overrides first one. If you comment first method all will work as expected.
Please file a bug report at http://youtrack.jetbrains.net/issues/ruby
Wow, sorry about that. That's crazy I didn't notice the other method.
Will do on the bug report. Seems like it would be a nice thing for the Inspector to point out something like two methods of the same name in a controller too (for slow people like me anyway).
Thanks for your time!
RubyMine shows to clicable gutters, see screenshot.
I never bothered to lookup what those gutter symbols were, pardon. That's awesome.
Thanks for all the help, I really appreciate it!