Sha256: 0d4a762df781999bd74f5d5cf225f5023626e93c113bee2f8916e61a52ddb691

Contents?: true

Size: 1.51 KB

Versions: 8

Compression:

Stored size: 1.51 KB

Contents

puts "Loading Blazer BI File"
require 'rails_admin/config/actions'

module RailsAdmin
	module Config
		module Actions
			class ThecoreBlazerBi < Base
				RailsAdmin::Config::Actions.register(self)
				register_instance_option :object_level do
					false
				end
				# This ensures the action only shows up for Users
				register_instance_option :visible? do
					# visible only if authorized and if the object has a defined method
					authorized? #&& bindings[:abstract_model].model == ThecoreSpotItemsImporterXl && bindings[:abstract_model].model.column_names.include?('barcode')
				end
				# We want the action on members, not the Users collection
				register_instance_option :member do
					false
				end
				
				register_instance_option :collection do
					false
				end
				register_instance_option :root? do
					true
				end
				
				register_instance_option :breadcrumb_parent do
					[nil]
				end
				
				register_instance_option :link_icon do
					'fa fa-line-chart'
				end

				register_instance_option :show_in_sidebar do
					true
				end
				
				# You may or may not want pjax for your action
				register_instance_option :pjax? do
					true
				end
				
				register_instance_option :http_methods do
					[:get]
				end
				# Adding the controller which is needed to compute calls from the ui
				register_instance_option :controller do
					proc do # This is needed because we need that this code is re-evaluated each time is called
						
						puts "Loading Blazer BI Controller"
					end
				end
			end
		end
	end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
thecore_ui_rails_admin-2.7.7 lib/iframes/blazer_bi.rb
thecore_ui_rails_admin-2.7.5 lib/iframes/blazer_bi.rb
thecore_ui_rails_admin-2.7.4 lib/iframes/blazer_bi.rb
thecore_ui_rails_admin-2.7.3 lib/iframes/blazer_bi.rb
thecore_ui_rails_admin-2.7.2.pre.test lib/iframes/blazer_bi.rb
thecore_ui_rails_admin-2.7.1 lib/iframes/blazer_bi.rb
thecore_ui_rails_admin-2.7.0 lib/iframes/blazer_bi.rb
thecore_ui_rails_admin-2.6.3 lib/iframes/blazer_bi.rb