Sha256: 969e5589d8f456808a7bad23327f645c57aaf0ddfc0b76f86a1b3904e0463d84
Contents?: true
Size: 747 Bytes
Versions: 9
Compression:
Stored size: 747 Bytes
Contents
module Tuning module Extensions module ActionView module Base extend ActiveSupport::Concern def active_trail?(path) (path == '/' && request.path == path) || request.path.start_with?(path) end def content_tag_if(condition, name, options={}, &block) if condition content_tag(name, options, &block) else capture(&block) end end def extending(layout, &block) if block_given? old_layout = @view_flow.get(:layout) new_layout = (capture(&block) || '') old_layout.replace(new_layout) end render file: "layouts/#{layout}" end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems