The logic is implemented in the Polynomial class (under app/models/ which is tested using rspec
As no persistence was required, it's not using AR - it's a vanilla Ruby class.
Using Rails is overkill for this simple API, but I chose it because of my familiarity with this framework