Skip to content

Instantly share code, notes, and snippets.

@itstommymorgan
Last active December 11, 2015 03:09
Show Gist options
  • Save itstommymorgan/4535828 to your computer and use it in GitHub Desktop.
Save itstommymorgan/4535828 to your computer and use it in GitHub Desktop.
def show
["twitter", "facebook", "tumblr"].each do |service|
account_name = Authentication.where(:provider => service, :user_id => current_user.id).first.try(:accountname)
self.instance_variable_set("@#{service}", account_name)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment