Because line 26 called model_path which ran the File.join - so the model_path method is no longer needed (or called anywhere). When it was a method, template complained - somehow the method was not in scope for it.