This repository has been archived by the owner on Apr 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e88cbb2
commit 11c6b9d
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |