3scale/issues-test — Issue #426: Admin::Api::BuyersApplicationPlansController doesn't take parameters for buy
Author: HakubJozak
Created: 2012-02-10 17:55:28+00:00
State: open
Labels: bug

Which means that it's impossible to buy an application plan in order to create a cintance since name and description are required (at least for yolink).

The code is:

def buy
application_plan = current_account.application_plans.stock.published.
find(params[:id])

@buyer.buy application_plan

respond_to do |wants|
wants.xml do
render :xml => application_plan, :status => :ok
end
end

rescue ActiveRecord::RecordNotFound
render :xml => "", :status => :not_found
end

It should at least render an error if creation fails and possibly render the cinstance if suceeds.

Tasks

https://www.pivotaltracker.com/story/show/17817063