Sha256: 0d48aa7f320523189f029d2ce14ce005bab2c97da93254a2bd5d7751f9e7bf83
Contents?: true
Size: 931 Bytes
Versions: 1
Compression:
Stored size: 931 Bytes
Contents
module Tramway::Profiles::LinksHelper def profile_link(profile) send profile.network_name, profile.uid, profile.title end private def vk(uid, title) profile_link_template title, "https://vk.com/#{uid}", :vk end def facebook(uid, title) profile_link_template title, "https://facebook.com/#{uid}", :facebook end def twitter(uid, title) profile_link_template title, "https://twitter.com/#{uid}", :twitter end def instagram(uid, title) profile_link_template title, "https://instagram.com/#{uid}", :instagram end def telegram(uid, title) profile_link_template title, "https://intg.me/#{uid}", :telegram end def patreon(uid, title) profile_link_template title, "https://patreon.com/#{uid}", :patreon end def profile_link_template(title, link, icon) link_to link, target: '_blank' do concat fab_icon icon concat ' ' concat title end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tramway-profiles-1.3.1 | app/helpers/tramway/profiles/links_helper.rb |