Minecraft wiki entry for Detector_Rail, associated text: the top of any full solid opaque block (stone, dirt, blocks of gold, etc.), including full-block mechanism components (command blocks, dispensers, droppers, note blocks, and redstone lamps)
the top of a hopper, upside-down slab, or upside-down stairs.