読者です 読者をやめる 読者になる 読者になる

IT練習ノート

IT関連で調べたこと(実際は嵌ったこと)を書いています。

Railsのリクエストパラメータの確認方法

ruby

logディレクトリ配下にログファイルがある。

(root)$ ls log
delete.me   development.log production.log
(root)$ vim log/development.log 

Started POSTを目印に探す。

例1:チケット作成時

Started POST "/projects/proj_hoge/issue_categories" for 127.0.0.1 at 2016-05-01 12:32:53 +0900
Processing by IssueCategoriesController#create as HTML 
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"tLh26w1pZDyrZ+7e3LywL+CMI1EUl3oM93udrssJHUEe7uFhfjLhYBBKL0ENht7pa9Htfk1eaJqlkMYbgdPtGA==", "issue_category"=>{"name"=>"新しいカテゴリ01", "assigned_to_id"=>""}, "commit"=>"作成", "project_id"=>"proj_hoge"}
  ^[[1m^[[35mSQL (8.8ms)^[[0m  UPDATE `tokens` SET `tokens`.`updated_on` = '2016-05-01 21:32:53' WHERE `tokens`.`user_id` = 1 AND `tokens`.`value` = '44c8a7afb44b4045a8dabe89b8b178b857183b1f' AND `tokens`.`action` = 'session' 

例2:カテゴリー作成時

Started POST "/projects/proj_hoge/issues" for 127.0.0.1 at 2016-05-01 12:25:30 +0900
Processing by IssuesController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"8el3FevbMDoiQr70DxFP4QtfcRIhI9e51V6WR8oPGrJbv+CfmIC1Zplvf2veKyEngAK/PXjqxS+Htc3ygNXq6w==", "form_update_triggered_by"=>"", "issue"=>{"is_private"=>"0", "tracker_id"=>"1", "subject"=>"aaaaa", "description"=>"", "status_id"=>"1", "priority_id"=>"2", "assigned_to_id"=>"", "parent_issue_id"=>"", "start_date"=>"2016-05-01", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0"}, "was_default_status"=>"1", "commit"=>"作成", "project_id"=>"proj_hoge"}