Sha256: e1e364a623d0e679856f1cdb35151290ddca2cd6a725062f1d809d9f3448edb2
Contents?: true
Size: 503 Bytes
Versions: 2
Compression:
Stored size: 503 Bytes
Contents
require 'type_station/blocks/base' module TypeStation module Blocks class EditLink < Base def render(content) content_tag(tag_name, content.html_safe, class: tag_class, id: tag_id, data: tag_data, href: href) end private def tag_name options[:content_tag] || :a end def tag_ts_url model.edit_url end def href model.try(key).try(:value) || options[:default] || '#nolink' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
type_station-0.1.3 | lib/type_station/blocks/edit_link.rb |
type_station-0.1.1 | lib/type_station/blocks/edit_link.rb |