Once the relation has been loaded, you can use regular array methods. find
is actually a very interesting method here – if block is specified, it will be delegated to the relation target:
@blogs.find {|b| b.id == 1}
Once the relation has been loaded, you can use regular array methods. find
is actually a very interesting method here – if block is specified, it will be delegated to the relation target:
@blogs.find {|b| b.id == 1}