Sha256: 388869adc05ec862f55f4eea734ab2aebfef6748c4cbc752ea42197559a0534b
Contents?: true
Size: 708 Bytes
Versions: 8
Compression:
Stored size: 708 Bytes
Contents
module Admin::ApplicationHelper include Pagy::Frontend def title content_for(:title) || Rails.application.class.to_s.split("::").first end def active_nav_item(controller, actions = %w( index show new edit create update)) "active" if active_actions?(controller, actions) end def np(number, options = {}) number_with_precision number, options end def nd(number, options = {}) number_with_delimiter number, options end def localize(object, **options) super(object, **options) if object end alias :l :localize private def active_actions?(controller, actions) params[:controller].include?(controller) && actions.include?(params[:action]) end end
Version data entries
8 entries across 8 versions & 1 rubygems