abstract dashboard controller to dashboard.rb and write tests