Sha256: 65885c066c8cb85f76cd9c3e5eab5914b47662133d4cb3b1ddd2a9b567c10b00

Contents?: true

Size: 323 Bytes

Versions: 7

Compression:

Stored size: 323 Bytes

Contents

##
# Support legacy root helpers that don't use the `:to` keyword argument.
#
# @example
#   root "photos#index"
module Rage::Router::DSLPlugins::LegacyRootNotation
  def root(*args, **kwargs)
    if args.length == 1 && args[0].is_a?(String) && kwargs.empty?
      super(to: args[0])
    else
      super
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rage-rb-1.12.0 lib/rage/router/dsl_plugins/legacy_root_notation.rb
rage-rb-1.11.0 lib/rage/router/dsl_plugins/legacy_root_notation.rb
rage-rb-1.10.1 lib/rage/router/dsl_plugins/legacy_root_notation.rb
rage-rb-1.10.0 lib/rage/router/dsl_plugins/legacy_root_notation.rb
rage-rb-1.9.0 lib/rage/router/dsl_plugins/legacy_root_notation.rb
rage-rb-1.8.0 lib/rage/router/dsl_plugins/legacy_root_notation.rb
rage-rb-1.7.0 lib/rage/router/dsl_plugins/legacy_root_notation.rb