unresolved error due to function last_step in application controller & model