Sha256: 0c67d22465704ea6ea59d443bace69ef117f23843bffcbfb985c1da3e6dc07b4

Contents?: true

Size: 218 Bytes

Versions: 9

Compression:

Stored size: 218 Bytes

Contents

# frozen_string_literal: true

module RailsWorkflow::Uuid
  extend ActiveSupport::Concern

  included do
    before_save :generate_guid
  end

  def generate_guid
    self.uuid = Guid.new.to_s if uuid.blank?
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails_workflow-0.7.3 app/concerns/rails_workflow/uuid.rb
rails_workflow-0.7.2 app/concerns/rails_workflow/uuid.rb
rails_workflow-0.7.1 app/concerns/rails_workflow/uuid.rb
rails_workflow-0.7.0 app/concerns/rails_workflow/uuid.rb
rails_workflow-0.4.4 app/concerns/rails_workflow/uuid.rb
rails_workflow-0.4.3 app/concerns/rails_workflow/uuid.rb
rails_workflow-0.4.2 app/concerns/rails_workflow/uuid.rb
rails_workflow-0.4.1 app/concerns/rails_workflow/uuid.rb
rails_workflow-0.4.0 app/concerns/rails_workflow/uuid.rb