Sha256: 41de8eb41b04dfd3d46070944aef6a6ebf06693b43f2b44c5024340f300e1a40
Contents?: true
Size: 589 Bytes
Versions: 11
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true module AuthorsHelper include BlogHelper def display_profile_item(item, item_desc) return if item.blank? item = link_to(item, item) if is_url?(item) tag.li do safe_join([item_desc, item], " ") end end def is_url?(str) [URI::HTTP, URI::HTTPS].include?(URI.parse(str.to_s).class) rescue URI::InvalidURIError false end def author_description(user) return if user.description.blank? tag.div(user.description, id: "author-description") end def author_link(article) h(article.author_name) end end
Version data entries
11 entries across 11 versions & 1 rubygems