We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cda416 commit 697e8afCopy full SHA for 697e8af
app/controllers/dojos_controller.rb
@@ -8,7 +8,7 @@ def index
8
year = params[:year].to_i
9
# 有効な年の範囲をチェック
10
unless year.between?(2012, Date.current.year)
11
- flash[:alert] = "指定された年(#{year})は無効です。2012年から#{Date.current.year}年の間で指定してください。"
+ flash[:alert] = "指定された年は無効です。2012年から#{Date.current.year}年の間で指定してください。"
12
return redirect_to dojos_path(anchor: 'table')
13
end
14
spec/requests/dojos_spec.rb
@@ -62,7 +62,7 @@
62
future_year = Date.current.year + 1
63
get dojos_path(year: future_year, format: :json)
64
expect(response).to redirect_to(dojos_path(anchor: 'table'))
65
- expect(flash[:alert]).to include("無効です")
+ expect(flash[:alert]).to include("指定された年は無効です")
66
67
68
it "handles invalid year strings" do
0 commit comments