Sha256: 7026c1da30f04a1c237accadd4940537aed103409246bfa0e3effc1f03cc01a6

Contents?: true

Size: 383 Bytes

Versions: 2

Compression:

Stored size: 383 Bytes

Contents

module Reflex
  module Authlogic
    class Connection < ActiveRecord::Base
      set_table_name 'reflex_connections'

      belongs_to :authorizable, :polymorphic => true
      validates_presence_of :uuid
  
      before_validation_on_create :generate_uuid
  
      private
  
      def generate_uuid
        self.uuid = UUIDTools::UUID.random_create.to_s
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
reflex-0.0.3 lib/reflex/authlogic/connection.rb
reflex-0.0.2 lib/reflex/authlogic/connection.rb