Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Branch < ActiveRecord::Base
- has_many :builds
- end
- class Build < ActiveRecord::Base
- belongs_to :branch
- end
- builds = Build.order(:finished_at).limit(10)
- builds.each do |build|
- puts "#{build.branch.name} build number #{build.number}"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement