Added skip_before_filter :verify_authenticity_token at the beginning of ProductsController to avoid the "Can't verify CSRF token authenticity" issue.