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?



43
44
45
46
47
48
49
50
51
# File 'lib/satis/configuration.rb', line 43

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