Method: ActionController::MimeResponds::Collector#custom
- Defined in:
- actionpack/lib/action_controller/metal/mime_responds.rb
#custom(mime_type, &block) ⇒ Object
271 272 273 274 275 276 277 278 |
# File 'actionpack/lib/action_controller/metal/mime_responds.rb', line 271 def custom(mime_type, &block) mime_type = Mime::Type.lookup(mime_type.to_s) unless mime_type.is_a?(Mime::Type) @responses[mime_type] ||= if block_given? block else VariantCollector.new(@variant) end end |