Sha256: 594dce1d1460f418e719d19f20e67dc64d3d9707e0feca865753c5eb6021bf80

Contents?: true

Size: 268 Bytes

Versions: 10

Compression:

Stored size: 268 Bytes

Contents

class Column < ActiveRecord::Base
  self.table_name = "extend_at_columns"
  belongs_to :column, :polymorphic => true
  belongs_to :extend_at, :class_name => 'ExtendAt'
  scope :for_model, lambda { |model|
    where(:model_id => model.try(:id) || model.to_i)
  }
end
 

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
extend_at-0.2.4 lib/extend_at/models/column.rb
extend_at-0.2.3 lib/extend_at/models/column.rb
extend_at-0.2.2 lib/extend_at/models/column.rb
extend_at-0.2.1 lib/extend_at/models/column.rb
extend_at-0.2.0 lib/extend_at/models/column.rb
extend_at-0.1.5 lib/extend_at/models/column.rb
extend_at-0.1.4 lib/extend_at/models/column.rb
extend_at-0.1.3 lib/extend_at/models/column.rb
extend_at-0.1.2 lib/extend_at/models/column.rb
extend_at-0.1.1 lib/extend_at/models/column.rb