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

質問編集履歴

2

追記

2019/08/29 03:05

投稿

tttu
tttu

スコア26

title CHANGED
File without changes
body CHANGED
@@ -44,6 +44,24 @@
44
44
  #### 該当カラム
45
45
  ![イメージ説明](98f9cf8b88439e276fa704721400f84e.png)
46
46
 
47
+ ### controller
48
+ ```Ruby
49
+ if !@info.station1.empty? && !@info.station1.include?("駅")
50
+ @info.station1 << "駅"
51
+ results1 = Geocoder.search(@info.station1)
52
+ @info.longitude_latitude1 = results1.first.coordinates.join(',')
53
+ elsif !@info.station1.empty? && @info.station1.include?("駅")
54
+ results1 = Geocoder.search(@info.station1)
55
+ @info.longitude_latitude1 = results1.first.coordinates.join(',')
56
+ end
57
+
58
+
59
+ if @info.save
60
+ .
61
+ .
62
+ .
63
+ ```
64
+
47
65
  ### 試したこと
48
66
  ・MYSQLで、variable_nameの文字コードをutf8mb4に
49
67
  ・database.yml内の設定もutf8mb4に

1

脱字修正

2019/08/29 03:05

投稿

tttu
tttu

スコア26

title CHANGED
File without changes
body CHANGED
@@ -45,7 +45,7 @@
45
45
  ![イメージ説明](98f9cf8b88439e276fa704721400f84e.png)
46
46
 
47
47
  ### 試したこと
48
- 文字コードをMYSQLでvariable_nameの文字コードをutf8mb4に
48
+ ・MYSQLでvariable_nameの文字コードをutf8mb4に
49
49
  ・database.yml内の設定もutf8mb4に
50
50
 
51
51
  #### 上記一通り試して見ましたが数時間ハマりっぱなしの状態です。お力添えいただければ幸いです。