Skip to content

Instantly share code, notes, and snippets.

@walidvb
Created November 18, 2014 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walidvb/299508431dab4567bba0 to your computer and use it in GitHub Desktop.
Save walidvb/299508431dab4567bba0 to your computer and use it in GitHub Desktop.
def facebook_account
u = self.user
link = "https://facebook.com/#{u.facebook}"
ActionController::Base.helpers.link_to("<i class='fa fa-facebook'></i>".html_safe, link, target: "_blank", class: "social-solo facebook") if (!(u.nil?) && !(u.facebook.nil?) && !(u.facebook.empty?) && u.show_facebook?)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment