I am attempting to use the PATCH/PUT actions on the method on controller:
def specialClickThrough
# Incriment click
clickIncrimentBudgetReduce = "UPDATE `campaigns`
SET clicks = clicks + 1
, budget = (budget - bid_price)
, is_active = CASE
WHEN (budget - bid_price) > 0.0
THEN 1
ELSE 0
END
WHERE id = " + params[:campaign_id].to_s
ActiveRecord::Base.connection.execute(clickIncrimentBudgetReduce)
end
When typing: localhost:3000/specialClickThrough/27
into the browser it returns that: No route matches [GET] "/specialClickThrough/27"
, even though there clearly is one as:
match '/specialClickThrough/:campaign_id', to: 'requests#specialClickThrough', via: 'put'
UPDATE
I tried in the postman chrome extension but still nothing:
From the docs it notes to simply set the request type as the one required. How can I get this to work?