In a Padrino project, Ruby itself is smart enough to know I'm referencing my Page
model instead of the paginator's Page
class. But RubyMine gets lost and thinks I'm dealing with the pagination and insists in marking some errors (as new
arguments vary).
What do I do in these cases?
On PHPStorm I was used to adding a PHPDoc just above the variable to tell it what type the variable is, but variable typing is not even the correct issue here... And RDoc seems too basic for this type of thing. Am I mistaken?
EDIT: RDdoc is indeed basic, but YARDoc is handy to annotate local variables. It's not useful in this case though, as the issue is indeed a name clash.
You can try YARDoc comments that RubyMine understands - https://www.jetbrains.com/help/ruby/2017.1/using-annotations.html#d464455e37
Besides that you can use full path to the class/constant you're using