For instance, sometimes I "visit" my clan members and see that their base is all rubble because they were attacked and haven't yet logged back on. Are the elixir pumps and gold mines still operating even when they look destroyed? Another example: let's say I'm raided at midnight and lose 100%. Then I don't look at my phone till 8 AM. Are the pumps operating between midnight and 8AM even though they were destroyed in the attack?
According to the top answer here, when your base is attacked and your Elixir Collectors/Gold Mines are destroyed, you will only lose as much as 50% of what was already in your buffer.
But to answer your question, yes, the Elixir Collectors/Gold mines still continue to function as normal, even after you are attacked, and they appear to be rubble. I know this from firsthand experience and I assume that the "rubble" appearance is merely a aesthetic affect.