Ignore Rails directories instead of their files

Some shell prompts use `git ls-files --other --exclude-standard --directory` to detect if there is any untracked changes. If only files under directories are ignored, shell prompt will still report existence of unstaged changes, which is a false positive.