Update datasets_controller.rb

refactoring