Project

General

Profile

Actions

Patch #28564

closed

JSON API responses cannot have elements named 'request' or 'response'

Added by Jens Krämer about 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugin API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I stumbled upon this while creating a Plugin with an API.

The problem is that Builders::Structure declares attr_accessor :request, :response. As a consequence, these get called instead of Structure#method_missing when doing api.request or api.response in a .rsb template.

This patch adds a test illustrating the problem and replaces the accessors with direct instance variable usage.


Files

Actions

Also available in: Atom PDF