Sha256: 7e1199645cb09879277ecc7a264de5f11d3883ecc1b750219508277ab80f41d3
Contents?: true
Size: 695 Bytes
Versions: 16
Compression:
Stored size: 695 Bytes
Contents
class Card class LazyTab < Tab def url @url ||= (config_hash? && @config[:path]) || format.path(view: view) end def view @view ||= (config_hash? && @config[:view]) || @config end def tab_button if url super else wrap_with(:li, label, role: "presentation") end end def button_attrib @button_attrib ||= super.merge("data-url" => url.html_safe) end def tab_button_link add_class button_attrib, "load" unless active? super end def content @content ||= "" end def tab_pane args=nil, &block @content = yield if active? && block_given? super end end end
Version data entries
16 entries across 16 versions & 2 rubygems