Problem with basic refactoring

Hello, I read in a lot of reviews that rubymine is great for refactoring, exactly what i am looking for.

Unfortunaty I cannot get a very trivial refactoring right.

I have a class:

def Class1
end

and a controller:

def Class1Controller
  def show
    @class1 = Class1.find(params[:id])
  end
end

I opened the class and selected Class1 and choose refactor=>rename
I get a dialog for the new name and choose Class2. and click refactor
After that i get a warning:

Cannot rename instance variable '@class1' to local 'class2'     

huh? I dont want that anyway so i continue.

The result is very strange, it did wat it first said was not possible: it changed @class1 to class2, so no from instance to local
Of course the app wont run after this

Tried this with multiple apps, all with the same result.

I must be missing something obvious here, who can help me out?

Regards,

Remco

1 comment
Comment actions Permalink

Hello, remco,

could you please attach screencast or screenshots if possible?
Unfortunately I cannot reproduce this error.

Dmitry

0

Please sign in to leave a comment.