module Leather::LeatherHelpers
Public Instance Methods
active_class(href, options)
click to toggle source
# File lib/leather/leather_helpers.rb, line 3 def active_class(href, options) if (options[:nav_id].present? && current_tab?(options[:nav_id][0], options[:nav_id][1])) || current_page?(href) 'active' else '' end end
modal(id = 'modal', html_options = {}, &block)
click to toggle source
# File lib/leather/leather_helpers.rb, line 15 def modal(id = 'modal', html_options = {}, &block) render partial: 'leather/bootstrap_components/modal', locals: { id: id, block: capture(&block), html_options: html_options } end
modal_body(&block)
click to toggle source
# File lib/leather/leather_helpers.rb, line 23 def modal_body(&block) render partial: 'leather/bootstrap_components/modal_body', locals: { block: capture(&block) } end
modal_header(title = '', &block)
click to toggle source
# File lib/leather/leather_helpers.rb, line 19 def modal_header(title = '', &block) render partial: 'leather/bootstrap_components/modal_header', locals: { title: title } end
modal_toggle(text, id = 'modal', html_options = {})
click to toggle source
# File lib/leather/leather_helpers.rb, line 11 def modal_toggle(text, id = 'modal', html_options = {}) link_to text, "##{id}", data: { toggle: "modal" }, class: html_options[:class] end