correct auto track param parsing for WordPress

This commit is contained in:
Sam 2013-07-22 12:26:02 +10:00
parent acba0ea41e
commit 0ec1438b9a
1 changed files with 3 additions and 0 deletions

View File

@ -204,6 +204,9 @@ class PostsController < ApplicationController
:auto_track :auto_track
] ]
# param munging for WordPress
params[:auto_track] = !(params[:auto_track].to_s == "false") if params[:auto_track]
if api_key_valid? if api_key_valid?
# php seems to be sending this incorrectly, don't fight with it # php seems to be sending this incorrectly, don't fight with it
params[:skip_validations] = params[:skip_validations].to_s == "true" params[:skip_validations] = params[:skip_validations].to_s == "true"