Method: Jets::Router::Scope#full_as

Defined in:
lib/jets/router/scope.rb

#full_asObject



54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/jets/router/scope.rb', line 54

def full_as
  items = []
  current = self
  while current
    items.unshift(current.options[:as]) # <= option_name
    current = current.parent
  end

  items.compact!
  return if items.empty?

  items = singularize_leading(items)
  items.join('_')
end