Skip to content
This repository has been archived by the owner on Apr 9, 2018. It is now read-only.

Commit

Permalink
Fix profiles social networks links
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme committed Mar 17, 2018
1 parent e88cbb2 commit 11c6b9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions app/helpers/tramway/profiles/links_helper.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
module Tramway::Profiles::LinksHelper
def profile_link(profile)
send profile.network_name, profile.uid
send profile.network_name, profile.uid, profile.title
end

private

def vk(uid)
profile_link_template uid, "https://vk.com/#{uid}", :vk
def vk(uid, title)
profile_link_template title, "https://vk.com/#{uid}", :vk
end

def facebook(uid)
profile_link_template uid, "https://facebook.com/#{uid}", :facebook
def facebook(uid, title)
profile_link_template title, "https://facebook.com/#{uid}", :facebook
end

def twitter(uid)
profile_link_template uid, "https://twitter.com/#{uid}", :twitter
def twitter(uid, title)
profile_link_template title, "https://twitter.com/#{uid}", :twitter
end

def profile_link_template(uid, link, icon)
def profile_link_template(title, link, icon)
link_to link, target: '_blank' do
concat fa_icon icon
concat ' '
concat uid
concat title
end
end
end
2 changes: 1 addition & 1 deletion lib/tramway/profiles/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Tramway
module Profiles
VERSION = '1.0.1'
VERSION = '1.0.2'
end
end

0 comments on commit 11c6b9d

Please sign in to comment.