Module: Wobauth::ApplicationHelper

Includes:
Wobapphelpers::Helpers::All
Defined in:
app/helpers/wobauth/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#admin_active_classObject



26
27
28
29
30
# File 'app/helpers/wobauth/application_helper.rb', line 26

def admin_active_class
  if [:users, :groups, :memberships, :roles, :authorities].include?(controller.controller_name.to_sym)
    "active"
  end
end


22
23
24
# File 'app/helpers/wobauth/application_helper.rb', line 22

def 
  render partial: 'wobauth/shared/accounting'
end


18
19
20
# File 'app/helpers/wobauth/application_helper.rb', line 18

def navigation_admin_links
  render partial: 'wobauth/shared/admin'
end

#polymorphic_selector(form, poly, types, group_method = :all) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/helpers/wobauth/application_helper.rb', line 5

def polymorphic_selector(form, poly, types, group_method = :all)
  msg = ""
  # -- object available?
  if form.object.send(poly).present?
  msg += poly_type_display(form, poly)
  msg += poly_id_select(form, poly, form.object.send("#{poly}_type"), :all)
  else
  msg += poly_type_select(form, poly, types)
  msg += poly_id_select(form, poly, types, group_method)
  end
  msg.html_safe
end