add rails plugin, branch diff function