Adam Templeton
Adam Templeton

Reputation: 4617

Rails: Including the '@' as part of a username link when using Twitter Text gem

I'm currently using the (frankly amazing) Twitter Text gem to automatically set up links within a tweet's status for a Twitter widget I'm building.

However, when using the auto_link functionality on usernames (i.e. @adamt), it drops the '@' from the link text, outputting something like:

@<a href="twitter.com/adamt">adamt</a>

Does anyone know of a simple way to include in the '@' inside that link using the Twitter Text gem?

Upvotes: 1

Views: 172

Answers (1)

Brad Werth
Brad Werth

Reputation: 17647

You need to use the :username_include_symbol => true option (from code).

Upvotes: 3

Related Questions