Add guard to gemfile and DRY up views.