Locking an attribute after it has a certain value
===

I have a model where if it is given a certain status, the status can never be changed again. I've tried to achieve this by putting in a before_save on the model  to check what the status is and raise an exception if it is set to that certain status. 

Problem is this - 

     def raise_if_exported
       if self.exported?
         raise Exception, "Can't change an exported invoice's status"
       end
     end  

which works fine but when I initially set the status to exported by doing the following - 

     invoice.status = "Exported"
     invoice.save

the exception is raised because the status is already set the exported on the model not the db (I think)

So is there a way to prevent that attribute from being changed once it has been set to "Exported"?