質問編集履歴

5

追記

2018/01/12 07:32

投稿

crypto_chrono
crypto_chrono

スコア11

test CHANGED
File without changes
test CHANGED
@@ -17,6 +17,44 @@
17
17
  アクションがないとエラーが出ます。
18
18
 
19
19
  これを綺麗に解決したいです。
20
+
21
+
22
+
23
+ ```ruby.
24
+
25
+ Rails.application.routes.draw do
26
+
27
+ root "users#index"
28
+
29
+ resources :users, shallow: true do
30
+
31
+ resources :orders, only: [:index] do
32
+
33
+ collection do
34
+
35
+ get :select
36
+
37
+ get :manual_select
38
+
39
+ get :manual_new
40
+
41
+ post :manual_create
42
+
43
+ end
44
+
45
+ end
46
+
47
+ end
48
+
49
+ resources :sessions, only: [:new, :create, :destroy]
50
+
51
+ end
52
+
53
+
54
+
55
+ ```
56
+
57
+
20
58
 
21
59
 
22
60
 

4

追記

2018/01/12 07:32

投稿

crypto_chrono
crypto_chrono

スコア11

test CHANGED
File without changes
test CHANGED
@@ -17,6 +17,66 @@
17
17
  アクションがないとエラーが出ます。
18
18
 
19
19
  これを綺麗に解決したいです。
20
+
21
+
22
+
23
+ ```slim
24
+
25
+ .row
26
+
27
+ .col-xs-12.col-md-4
28
+
29
+ .col-xs-12.col-md-4
30
+
31
+ .panel.panel-default
32
+
33
+ .panel-heading 新規登録
34
+
35
+ .panel-body
36
+
37
+ = form_for @user do |f|
38
+
39
+ .form-group
40
+
41
+ = f.label "Email"
42
+
43
+ = f.email_field :email,class: "form-control", required: :required, placeholder: "Email"
44
+
45
+ = f.label "姓"
46
+
47
+ = f.text_field :family_name, required: :required,class: "form-control", placeholder: "姓"
48
+
49
+ = f.label "名"
50
+
51
+ = f.text_field :first_name, required: :required,class: "form-control", placeholder: "姓"
52
+
53
+ = f.label "パスワード"
54
+
55
+ = f.password_field :password, required: :required,class: "form-control", placeholder: "6文字以上"
56
+
57
+ = f.label "パスワード再入力"
58
+
59
+ = f.password_field :password_confirmation,class: "form-control", required: :required, placeholder: "6文字以上"
60
+
61
+ = f.submit "送信", class: "btn btn-primary btn-lg btn-block"
62
+
63
+ = link_to "ログイン", new_session_path, class: "btn btn-default btn-lg btn-block"
64
+
65
+ = link_to auth_at_provider_path(provider: :twitter), class: "btn btn-block btn-social btn-lg btn-twitter"
66
+
67
+ i.fa.fa-twitter
68
+
69
+ .sns-title = "Twitterログイン"
70
+
71
+ = link_to auth_at_provider_path(provider: :facebook), class: "btn btn-block btn-social btn-lg btn-facebook"
72
+
73
+ i.fa.fa-facebook
74
+
75
+ .sns-title = "Facebookログイン"
76
+
77
+
78
+
79
+ ```
20
80
 
21
81
 
22
82
 

3

エラー文の修正

2018/01/12 07:31

投稿

crypto_chrono
crypto_chrono

スコア11

test CHANGED
File without changes
test CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  なので、リロードすると
16
16
 
17
- ルーティエラーになります。
17
+ アクショがないとエラーが出ます。
18
18
 
19
19
  これを綺麗に解決したいです。
20
20
 

2

説明の追記

2018/01/12 07:07

投稿

crypto_chrono
crypto_chrono

スコア11

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,22 @@
1
1
  Railsのモデルのバリデーションでのエラーをrenderで表示するとURLが変わってしまうので、リロードした時にエラーが起きてしまいます
2
+
3
+ すみません、追記です。
4
+
5
+ URLが
6
+
7
+ /users/new
8
+
9
+ から
10
+
11
+ /users
12
+
13
+ になると言うことです。
14
+
15
+ なので、リロードすると
16
+
17
+ ルーティングエラーになります。
18
+
19
+ これを綺麗に解決したいです。
2
20
 
3
21
 
4
22
 

1

タイトルの誤記

2018/01/12 06:06

投稿

crypto_chrono
crypto_chrono

スコア11

test CHANGED
@@ -1 +1 @@
1
- Railsのモデルのバリデーションでのエラーメッセージ表示するとURLが変わってしまう件について。。
1
+ Railsのモデルのバリデーションでのエラーメッセージ表示するとURLが変わってしまう件について。。
test CHANGED
File without changes