mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
2e45542942
author.posts.create should take into account default_scope defined on post. [#3939: state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
10 lines
211 B
Ruby
10 lines
211 B
Ruby
class Car < ActiveRecord::Base
|
|
has_many :bulbs
|
|
has_many :tyres
|
|
has_many :engines
|
|
has_many :wheels, :as => :wheelable
|
|
|
|
scope :incl_tyres, includes(:tyres)
|
|
scope :incl_engines, includes(:engines)
|
|
|
|
end
|