Sha256: 8b938ee15f804a84ee2b202a398ec0723405ce98a6289603a43cde7af40b717d
Contents?: true
Size: 694 Bytes
Versions: 13
Compression:
Stored size: 694 Bytes
Contents
puts "BulkDelete Concern from ThecoreUiRailsAdmin" require 'active_support/concern' module BulkDeleteConcern extend ActiveSupport::Concern included do # Should the action be visible # Edit By taris, it shows the button only if there are records displayed register_instance_option :visible? do # If not in index, then return true, # otherwise it wont' be added to the list # of all Actions during rails initialization # In index, instead, I show it only if there are records in the current view bindings[:controller].action_name == "index" ? (authorized? && !bindings[:controller].instance_variable_get("@objects").blank?) : true end end end
Version data entries
13 entries across 13 versions & 1 rubygems