teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

修正

2018/07/26 05:55

投稿

kozica
kozica

スコア58

title CHANGED
File without changes
body CHANGED
@@ -9,14 +9,18 @@
9
9
  Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)
10
10
 
11
11
  TypeError (no implicit conversion of ActionController::Parameters into String):
12
- app/controllers/personal_logs_controller.rb:17:in `presenceapi'
12
+ app/controllers/personal_logs_controller.rb:12:in `presenceapi'
13
13
 
14
14
  ```
15
15
 
16
- controllers/personal_logs_controller.rbに原因があるようなですが、どうアプローチしていいかわかりません。
16
+ app/controllers/personal_logs_controller.rbの
17
+ ```
18
+ map = JSON.parse(params[:data]).with_indifferent_access
19
+ ```
20
+ ここ周辺に原因があるようですが、どうアプローチしていいかわかりません。
17
21
  下記に該当コードを載せておきます
18
22
 
19
- どうかお力を貸して頂きたいです
23
+ 本当に困ってるのでどうかお力を貸して頂きたいです
20
24
  ```ruby
21
25
  #app/controllers/personal_logs_controller
22
26
  MERAKI_VALIDATOR='xxxxxxxxxxxxxxxxxxxxxxxxxx'
@@ -27,11 +31,6 @@
27
31
  before_action :set_personal_log, only: [:show, :edit, :update, :destroy]
28
32
 
29
33
  def presenceapi
30
- validator = {
31
- "version":"2.0",
32
- "validator":"66c06e9ac54b52f34f434074fbb1270d96344702",
33
- "secret":"nkqveg52"
34
- }
35
34
  if request.post?
36
35
  map = JSON.parse(params[:data]).with_indifferent_access
37
36
  if map[:secret] == MERAKI_SECRET