Class: ActiveRecordEx::ManyToMany::ModelArel
Instance Method Summary
collapse
#disjunct, #none, #relative_complement, #where_only
Constructor Details
#initialize(model) ⇒ ModelArel
7
8
9
10
11
|
# File 'lib/active_record_ex/many_to_many.rb', line 7
def initialize(model)
super(model.class, model.class.arel_table)
@loaded = true
@records = [model]
end
|
Instance Method Details
#pluck(key) ⇒ Object
18
19
20
21
|
# File 'lib/active_record_ex/many_to_many.rb', line 18
def pluck(key)
key = key.name if key.respond_to? :name
@records.map(&:"#{key}")
end
|
#reset ⇒ Object
13
14
15
16
|
# File 'lib/active_record_ex/many_to_many.rb', line 13
def reset
end
|