%a.twitter-share-button{"data-size" => "large", "data-text" => "Check out #{model.name.strip}'s #UserGroup profile#{model.twitter_account.present? ? " and follow @#{model.twitter_account.screen_name}" : ''}", "data-url" => user_group_url(model), "data-via" => "uglst", href: "https://twitter.com/share"}
  Tweet
  @#{model.twitter_account.screen_name}

:javascript
  !function (d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
      if (!d.getElementById(id)) {
        js = d.createElement(s);
        js.id = id;
        js.src = p + '://platform.twitter.com/widgets.js';
        fjs.parentNode.insertBefore(js, fjs);
      }
    }(document, 'script', 'twitter-wjs');

- if model.respond_to?(:screen_name)
  %a.twitter-share-button{"data-size" => "large", "data-text" => "Check out #{model.name.strip}'s #UserGroup profile#{model.twitter_account.present? ? " and follow @#{model.twitter_account.screen_name}" : ''}", "data-url" => user_group_url(model), "data-via" => "uglst", href: "https://twitter.com/share"}
    Tweet
    @#{model.twitter_account.screen_name}

  :javascript
    !function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
        if (!d.getElementById(id)) {
          js = d.createElement(s);
          js.id = id;
          js.src = p + '://platform.twitter.com/widgets.js';
          fjs.parentNode.insertBefore(js, fjs);
        }
      }(document, 'script', 'twitter-wjs');

Check if UG has a Twitter Account
Check if UG has a Twitter Account
