レールでリソースの少ないルートを設定したいのですが、方法がわかりません。Rails apiは、構造はこのようでなければならないと言っています。投稿'post/:id' => 'posts#create_comment'
しますが、正確に何を書くべきかわかりません。
bankacctscontroller にあるメソッド「addbank」に投稿したい localhost:3000/bankaccts/new ページに表示されます
def addbank
if (params['customer_uri'])
current_user.customer_uri = (params['customer_uri'])
end
if current_user.save
redirect_to root_url, :notice => "bank account added"
else
render json: {error: "Payment account could not be configured properly"}, status: 401
end
end