Sha256: 43a97024368de4c16691887551886296f7785081c2999ead71cb6406c7ecf9a5
Contents?: true
Size: 708 Bytes
Versions: 9
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
9 entries across 9 versions & 1 rubygems