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

51 文言の日本語化 #59

Merged
merged 2 commits into from
Mar 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/controllers/order_items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def create
@order_item = @order.order_items.build(order_item_params)

if @order_item.save
redirect_to order_order_items_path(@order) , notice: 'Order item was successfully created.'
redirect_to order_order_items_path(@order) , notice: '注文しました'
Copy link
Collaborator

Choose a reason for hiding this comment

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

order_order_items_path(@order) のあとのスペースが気になる...

Copy link
Member Author

Choose a reason for hiding this comment

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

ここの修正を抜かしてしまった・・・ 😇
PR単体で出して修正します 🙇

Copy link
Member Author

Choose a reason for hiding this comment

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

#79 にて修正しました

else
render :new
end
Expand All @@ -39,7 +39,7 @@ def update
def destroy
@order_item.destroy
if @order_item
notice = "#{@order_item.customer_name}'s' #{@order_item.lunchbox.name} item was successfully deleted."
notice = "#{@order_item.customer_name} さんの #{@order_item.lunchbox.name} の注文を取り消しました。"
redirect_to order_order_items_path(@order_item.order) , notice: notice
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/order_items/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ table(border=1)
td.name(align="center") = "✓"
- else
td.name = ""
td.name = link_to "cancel", order_order_item_path(@order, item), method: :delete, data: {confirm: 'Are you certain you want to delete this?'}
td.name = link_to '予約取り消し', order_order_item_path(@order, item), method: :delete, data: {confirm: 'この注文を取り消しますか?'}

6 changes: 3 additions & 3 deletions spec/features/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@

visit order_order_items_path(order)
expect(page).to have_text(order_item.customer_name)
expect(page).to have_text('cancel')
expect(page).to have_text('予約取り消し')

click_link('cancel')
click_link('予約取り消し')
expect(page).not_to have_text(order_item.customer_name)
end

Expand All @@ -62,7 +62,7 @@
visit order_order_items_path(order)

expect(page).to have_text(order_item.customer_name)
expect(page).not_to have_link('cancel')
expect(page).not_to have_link('予約取り消し')
end
end

Expand Down