Skip to content

Commit 4223bb4

Browse files
Fixes Issue #266 (#288)
* add value create * update spec test * Bump version of Ruby * Generated schema * Use i18n for button label * Expect to see "Save changes" as a button, not "Create" * Bump CI to Ruby 3.1.1 --------- Co-authored-by: Damon Clark <dclark312@gmail.com>
1 parent 50e025f commit 4223bb4

12 files changed

Lines changed: 34 additions & 37 deletions

File tree

.github/workflows/tests-next.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ jobs:
3535
- name: Setup Ruby
3636
uses: ruby/setup-ruby@v1
3737
with:
38-
ruby-version: "3.1.0"
38+
ruby-version: "3.1.1"
3939

4040
- name: Build App
4141
run: |
42-
bundle update rails --jobs=4 --retry=3
42+
bundle update rails --jobs=4 --retry=3
4343
bundle exec rails db:setup
4444
- name: Run RSpec
4545
run: |

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Setup Ruby
3636
uses: ruby/setup-ruby@v1
3737
with:
38-
ruby-version: "3.1.0"
38+
ruby-version: "3.1.1"
3939
bundler-cache: true
4040

4141
- name: Build App

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def next?
44
File.basename(__FILE__) == "Gemfile.next"
55
end
66

7-
ruby "3.1.0"
7+
ruby "3.1.1"
88

99
git_source(:github) do |repo_name|
1010
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ DEPENDENCIES
430430
webdrivers
431431

432432
RUBY VERSION
433-
ruby 3.1.0p0
433+
ruby 3.1.1p18
434434

435435
BUNDLED WITH
436-
2.2.26
436+
2.4.7

app/views/estimates/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</div>
2727

2828
<div class="btn-group">
29-
<%= f.submit yield(:button_text), class: "button", id: "edit" %>
29+
<%= f.submit t(".button_text"), value: t(".button_text"), class: "button", id: "edit" %>
3030
</div>
3131

3232
<% if estimate.persisted? %>

app/views/estimates/edit.html.erb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<div class="container">
2-
<% provide(:button_text, 'Save Changes') %>
3-
42
<%= render "shared/story", story: @story %>
53

64
<hr>

app/views/estimates/edit.js.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<% provide(:button_text, 'Save Changes') %>
21
(function(){
32
showModal("Edit Estimate", "<%= j(render partial: "modal_body") %>")
43
})()

app/views/estimates/new.html.erb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<div class="container">
2-
<% provide(:button_text, 'Create') %>
3-
42
<p>New Estimate</p>
53
<%= render "shared/story", story: @story %>
64

app/views/estimates/new.js.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<% provide(:button_text, 'Create') %>
21
(function(){
32
showModal("New Estimate", "<%= j(render partial: "modal_body") %>")
43
})()

config/locales/en.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@
3030
# available at http://guides.rubyonrails.org/i18n.html.
3131

3232
en:
33+
estimates:
34+
form:
35+
button_text: "Save changes"
3336
hello: "Hello world"
37+

0 commit comments

Comments
 (0)