Created
December 14, 2017 14:30
-
-
Save chewmanfoo/eb78b5e13b8250ac3b9478a11de2264b to your computer and use it in GitHub Desktop.
params and error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#... | |
def cf_deployment_params | |
params.permit(:env, :account, :delay, :deploy_at, :cf_template_id, :dry_run, cf_deployment:[:env, :account]) | |
end | |
#... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when using curl -i -X POST -H "Content-Type:application/json" http://127.0.0.1:3000/cf_templates/1/cf_deployments -d '{"env":"cit_certification"}' | |
I see (in the logs): | |
Parameters: {"env"=>"cit_certification", "cf_template_id"=>"1", "cf_deployment"=>{"env"=>"cit_certification"}} | |
and the error: | |
Completed 500 Internal Server Error in 31ms (ActiveRecord: 9.2ms) | |
ActiveModel::UnknownAttributeError (unknown attribute 'cf_deployment' for CfDeployment.): | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.routes.draw do | |
# cf_deployments is nested within cf_templates | |
resources :cf_templates do | |
resources :cf_deployments | |
end | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment