Class: ActiveAdmin::Views::Pages::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/activeadmin_jobs/activeadmin_config.rb

Instance Method Summary collapse

Instance Method Details

#add_classes_to_bodyObject



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/activeadmin_jobs/activeadmin_config.rb', line 19

def add_classes_to_body
  adj_add_classes_to_body
  current_user_method = ActiveAdmin.application.current_user_method

  if current_user_method
    admins_job_identifier = send(current_user_method).job_identifier
    @body.set_attribute "data-identifier", admins_job_identifier
    @body.set_attribute "data-root-url", "/"
    @body.set_attribute "data-jobs-url", AdminHelpers.jobs_url
    @body.set_attribute "data-translations", I18nDictionary.translations.to_json
  end
end

#adj_add_classes_to_bodyObject



17
# File 'lib/activeadmin_jobs/activeadmin_config.rb', line 17

alias_method :adj_add_classes_to_body, :add_classes_to_body