Fix test errors with rails 4

Fixed tests so they run with rails 3.2 & rails 4!

With Rails 4 we have to require action_controller and active_model.Also, RecordIdentifiers are being deprecated in the controller so we have to include them from ActionView.