Corrected the encode call to use the active formatter

Currently, the active resource just calls ```to_[formatter extension]``` to encode, but it should be utilizing the active formatter's encode method instead.