views:

45

answers:

1

I have a very complex controller with a very complex set of views and partial views that I'm trying to clean up (not written by me originally).

In the controller, it defines member variables, like:

@blah = "blah"

which I'm not sure if they are used in a view, or a partial view, or a partial view called by a partial view. Is there any way to find out?

+2  A: 

Is there any way to find out?

  1. Write the tests for a given action.
  2. Make sure they all pass.
  3. Start cleaning up the code.
  4. Repeat from 1 for every action you want to cleanup.

With autotest it will be a matter of minutes.

Dmytrii Nagirniak
exactly what I'd suggest: write tests, then refactor
psyho