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
Warn to seed the database when no Developer records in development #494
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor requests and we are good to merge!
app/views/developers/index.html.erb
Outdated
| @@ -41,6 +41,7 @@ | |||
|
|
|||
| <!-- Paginated list of developers --> | |||
| <div class="col-span-12 md:col-span-9"> | |||
| <%= render Developers::UnseededWarningComponent.new(seedable: Rails.env.development?) %> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this to app/views/shared/_main.html.erb:2 so it shows up on every page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| test "hidden when seedable but developers exist" do | ||
| render_inline UnseededWarningComponent.new(seedable: true) | ||
| assert_no_text("Run bin/rails db:seed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's consolidate using parenthesis or not for these assertions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. I removed them to be consistent
|
@joemasilotti I've updated this PR based on your feedback. Looking sharp |
|
Excellent - thanks for the contribution! |

Connects to #472; broken out of #484 .
Adds a warning when in the Rails Development environment and the database has no Developer records to seed the database.
bin/check/developers#484 will cover it.