Class

ActionController::Routing::OptionalFormatSegment

Inheritance
< ActionController::Routing::DynamicSegment < ActionController::Routing::Segment < Object

The OptionalFormatSegment allows for any resource route to have an optional :format, which decreases the amount of routes created by 50%.

Methods

Class

Visibility Signature
public new (key = nil, options = {})

Instance

Visibility Signature
public extract_value ()
public interpolation_chunk ()
public match_extraction (next_capture)
public regexp_chunk ()
public to_s ()

Class Method Detail

new(key = nil, options = {})

Instance Method Detail

extract_value()

interpolation_chunk()

match_extraction(next_capture)

the value should not include the period (.)

regexp_chunk()

to_s()