Sha256: efef12e92441133e61929a5e20e17d80f0bfba45f8b52c164382564cde60fb49
Contents?: true
Size: 470 Bytes
Versions: 2
Compression:
Stored size: 470 Bytes
Contents
require 'openstax_api/constraints' module OpenStax module Api module RouteExtensions def api(version = :v1, default = false) constraints = Constraints.new(version: version, default: default) namespace :api, defaults: {format: 'json'} do scope(module: version, constraints: constraints) { yield } end end end end end ActionDispatch::Routing::Mapper.send :include, OpenStax::Api::RouteExtensions
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
openstax_api-0.1.0 | lib/openstax_api/route_extensions.rb |
openstax_api-0.0.1 | lib/openstax_api/route_extensions.rb |