Skip to content

Commit

Permalink
Import ActionController::MissingRenderer from Rails
Browse files Browse the repository at this point in the history
  • Loading branch information
zzak committed Jan 12, 2025
1 parent 9bdc60d commit 80a5470
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/action_controller/responder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
require "active_support/json"

module ActionController # :nodoc:
unless defined?(:MissingRenderer)
# See Responder#api_behavior
class MissingRenderer < LoadError
def initialize(format)
super "No renderer defined for format: #{format}"
end
end
end

# Responsible for exposing a resource to different mime requests,
# usually depending on the HTTP verb. The responder is triggered when
# <code>respond_with</code> is called. The simplest case to study is a GET request:
Expand Down

0 comments on commit 80a5470

Please sign in to comment.