Sha256: 7a48d0d07366ff9b36e358a0510bbb60c8f88fa11e15f0f4154336af7df6f4f7
Contents?: true
Size: 437 Bytes
Versions: 32
Compression:
Stored size: 437 Bytes
Contents
class Pulitzer::PostTypeVersion::Retire include StateMachine::Transition self.action_name = :retire self.target_state = 'retired' self.valid_from_states = [:published] def initialize(post_type_version) @post_type_version = post_type_version self.object = @post_type_version self.errors = ActiveModel::Errors.new(self) end def retire self.validate_transition! update_status return true end end
Version data entries
32 entries across 32 versions & 1 rubygems