Method: Satis::Configuration#help_scope

Defined in:
lib/satis/configuration.rb

#help_scope(template, object, additional_scope, action: nil) ⇒ Object

Maybe not the right place?



53
54
55
56
57
58
59
60
61
# File 'lib/satis/configuration.rb', line 53

def help_scope(template, object, additional_scope, action: nil)
  scope = template.controller.controller_path.split("/")
  scope << (action || template.controller.action_name)
  scope << object.class.name.demodulize.tableize.singularize

  scope += Array.wrap(additional_scope) if additional_scope

  scope.map(&:to_s)
end