Sha256: a132dbc21382bef2d836bb59b9eeab408a73b1d75196244c99aa957c41ce4131

Contents?: true

Size: 334 Bytes

Versions: 8

Compression:

Stored size: 334 Bytes

Contents

module PGCrypto
  class Column < ActiveRecord::Base
    self.table_name = 'pgcrypto_columns'
    before_save :set_owner_table
    belongs_to :owner, :autosave => false, :inverse_of => :pgcrypto_columns, :polymorphic => true

    protected
    def set_owner_table
      self.owner_table = self.owner.class.table_name
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pgcrypto-0.2.7 lib/pgcrypto/column.rb
pgcrypto-0.2.6 lib/pgcrypto/column.rb
pgcrypto-0.2.5 lib/pgcrypto/column.rb
pgcrypto-0.2.4 lib/pgcrypto/column.rb
pgcrypto-0.2.2 lib/pgcrypto/column.rb
pgcrypto-0.2.1 lib/pgcrypto/column.rb
pgcrypto-0.2.0 lib/pgcrypto/column.rb
pgcrypto-0.1.1 lib/pgcrypto/column.rb