Sha256: c0a2a4eae744ac9ce417f6041e7deda9212335378775b8b86af2a555a31a95a6

Contents?: true

Size: 274 Bytes

Versions: 17

Compression:

Stored size: 274 Bytes

Contents

class Baza::ForeignKey
  include Baza::DatabaseModelFunctionality

  attr_reader :column_name, :db, :name, :table_name

  def column
    @_column ||= table.column(column_name)
  end

  def table
    @_table ||= db.tables[table_name]
  end

  def to_param
    name
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
baza-0.0.38 lib/baza/foreign_key.rb
baza-0.0.37 lib/baza/foreign_key.rb
baza-0.0.36 lib/baza/foreign_key.rb
baza-0.0.35 lib/baza/foreign_key.rb
baza-0.0.34 lib/baza/foreign_key.rb
baza-0.0.33 lib/baza/foreign_key.rb
baza-0.0.32 lib/baza/foreign_key.rb
baza-0.0.31 lib/baza/foreign_key.rb
baza-0.0.30 lib/baza/foreign_key.rb
baza-0.0.29 lib/baza/foreign_key.rb
baza-0.0.28 lib/baza/foreign_key.rb
baza-0.0.27 lib/baza/foreign_key.rb
baza-0.0.26 lib/baza/foreign_key.rb
baza-0.0.25 lib/baza/foreign_key.rb
baza-0.0.24 lib/baza/foreign_key.rb
baza-0.0.23 lib/baza/foreign_key.rb
baza-0.0.22 lib/baza/foreign_key.rb