Sha256: f62d6cc07715d7c3e808bd514d7165f105f2b191d8408378a86f9140af3c0598
Contents?: true
Size: 412 Bytes
Versions: 2
Compression:
Stored size: 412 Bytes
Contents
module JsonSchemaRails class SchemasController < ApplicationController def show schema = JsonSchemaRails.lookup_schema(params[:id]) raise ActionController::RoutingError.new('No Such Schema') unless schema respond_to do |format| format.yaml { render text: schema.to_hash.to_yaml, content_type: 'text/yaml' } format.json { render json: schema } end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
json_schema_rails-0.2.1 | app/controllers/json_schema_rails/schemas_controller.rb |
json_schema_rails-0.2.0 | app/controllers/json_schema_rails/schemas_controller.rb |