Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

骨組み作成 #37

Merged
merged 8 commits into from
Mar 7, 2017
Merged

骨組み作成 #37

merged 8 commits into from
Mar 7, 2017

Conversation

tkm-kj
Copy link
Contributor

@tkm-kj tkm-kj commented Mar 6, 2017

必要な機能のrouting、controller、Viewを作りました。
ルーティングはこちら↓

Prefix Verb   URI Pattern                                                    Controller#Action
      admin_order_submit PATCH  /admin/orders/:order_id/submit(.:format)                       admin/orders#submit
             admin_order GET    /admin/orders/:id(.:format)                                    admin/orders#show
           order_confirm GET    /orders/:order_id/confirm(.:format)                            orders#confirm
order_order_item_receive PATCH  /orders/:order_id/order_items/:order_item_id/receive(.:format) order_items#receive
       order_order_items POST   /orders/:order_id/order_items(.:format)                        order_items#create
    new_order_order_item GET    /orders/:order_id/order_items/new(.:format)                    order_items#new
   edit_order_order_item GET    /orders/:order_id/order_items/:id/edit(.:format)               order_items#edit
        order_order_item PATCH  /orders/:order_id/order_items/:id(.:format)                    order_items#update
                         PUT    /orders/:order_id/order_items/:id(.:format)                    order_items#update
                         DELETE /orders/:order_id/order_items/:id(.:format)                    order_items#destroy
                  orders GET    /orders(.:format)                                              orders#index
                   order GET    /orders/:id(.:format)                                          orders#show
                    root GET    /                                                              orders#index

# 発注確認画面
end

def submit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

submit だと、そのアクションが動くと注文がどこかに "提出" (つまり注文が自動的に行われる)みたいな感じもしなくもないので、 "締め切る" っていうニュアンスのあるもの(close とか close_order とか?)のほうが後々いいかなと思ったりしました。
(もしかしたら、今後開発が進んで「ポチっとしたら自動的にお弁当屋さんに注文がいく」ようなしくみが本当に実装されるかもしれないので)

# 予約確認画面
end

def confirm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

個人的な感覚だけどどーも confirm っていうと「イカの内容で登録します。よろしいですか?」的なページを想像してしまう 😇

たぶん、そもそも https://app.moqups.com/colorbox222@gmail.com/IjJQsSFMcQ/view/page/a43a084e8 の画面でやりたいことは "確認" じゃなくて、 "受け取ったことを確定する" とか、 "受領する" とかいうことなんじゃないかなと思ったので、そういう名前のほうが何をしてるかわかりやすいコードになるような気がしました。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あれ、ごめんなさい私がなにか勘違いしてるかも?

config/routes.rb Outdated
end
end

root 'orders#index'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tkm-kj
Copy link
Contributor Author

tkm-kj commented Mar 7, 2017

@colorbox @yucao24hours レビューお願いします 🙏

@colorbox colorbox self-requested a review March 7, 2017 12:53
Copy link
Member

@colorbox colorbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think LGTM

Copy link
Member

@colorbox colorbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think LGTM

@colorbox colorbox merged commit 0b9cfd1 into master Mar 7, 2017
@colorbox colorbox deleted the add_frame branch March 7, 2017 13:00
end

root 'orders#index'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あれ、ここ root を先頭に持ってきてほしいっていうコメント書いてたんだけど、 review required 機能を外したときにコメントもなくなっちゃったのかな...
https://railsguides.jp/routing.html#root%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B

特に意図がなければ root は先頭に持ってきたほうがいいかなと思いました( #32 で直してレビューお願いしようと思うのでなにかあればそこで 🙏 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants