better rails component detection