3 ms·
Simple Ruby gem I was surprised didn't exist (that I could find): `validates_twitter_username` Given user input for username, ensure it is valid. Two levels of
by swanson 13y ago
Simple Ruby gem I was surprised didn't exist (that I could find): `validates_twitter_username`
Given user input for username, ensure it is valid. Two levels of verification - one would be probably regex based that the username matches twitter restrictions (valid characters, length less than 15), one that pings twitter to confirm the account is registered. Appropriate ActiveRecord errors etc
Good experience if you aren't familiar with packaging a gem and publishing to rubygems as well.
- pedalpete 13y agoThanks Swanson, I haven't made a Gem before, and for an interview I was actually asked to make an app which used the twitter api and let you search for a user, so I implemented some of this already in Javascript. That's an interesting idea. I'll give it a go when I have more time (swamped by school work this week).