UserProfileFormatter is a gem to validate a username of social media. If username does not exists then the name is not valid. Integrated with: - Twitter - Facebook - YouTube - Tumblr - GoldenLine - Blip


Add this line to your application's Gemfile:

    gem 'user_profile_formatter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install user_profile_formatter

Requires Ruby 1.9.2 or latter.


To start using UserProfileFormatter you just have to call format_user_profile in an ActiveRecord class and pass the name of the attribute. The second parameter is social media. If username is the same like social media then you need not specify second parameter.

class Profile < ActiveRecord::Base

Or use specific names:

class Profile < ActiveRecord::Base
   :twitter_name, :twitter
   :facebook_name, :facebook
   :youtube_name, :youtube
   :tumblr_name, :tumblr
   :goldenline_name, :goldenline
   :blip_name, :blip


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request