Class: DasherizedRouteFormatter

Inherits:
JSONAPI::RouteFormatter show all
Defined in:
lib/jsonapi/formatter.rb

Class Method Summary collapse

Methods inherited from JSONAPI::Formatter

cached, formatter_for

Class Method Details

.format(route) ⇒ Object


147
148
149
# File 'lib/jsonapi/formatter.rb', line 147

def format(route)
  super.dasherize
end

.unformat(formatted_route) ⇒ Object


151
152
153
# File 'lib/jsonapi/formatter.rb', line 151

def unformat(formatted_route)
  formatted_route.to_s.underscore
end