-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
Deprecate Alchemy.enable_searchable
for Alchemy.config.show_page_searchable_checkbox
#3188
Conversation
This makes it easier to deprecate these methods.
We only want to forego validation if the value passed into an option is `nil`, not when it's false.
09ea945
to
c442d40
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3188 +/- ##
=======================================
Coverage 96.69% 96.70%
=======================================
Files 256 256
Lines 6606 6613 +7
=======================================
+ Hits 6388 6395 +7
Misses 218 218 ☔ View full report in Codecov by Sentry. |
c442d40
to
f9a1a77
Compare
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.
lib/alchemy/configurations/main.rb
Outdated
# | ||
# # config/initializers/alchemy.rb | ||
# Alchemy.config.page_searchable_checkbox = true | ||
option :page_searchable_checkbox, :boolean, default: false |
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.
What about show_page_searchable_checkbox
?
Instead, use the `Alchemy.config.page_searchable_checkbox` Boolean.
f9a1a77
to
4f69f7c
Compare
@mamhoff can we update the commit message and PR description for the new config name as well? |
Alchemy.enable_searchable
for Alchemy.config.page_searchable_checkbox
Alchemy.enable_searchable
for Alchemy.config.show_page_searchable_checkbox
Done! |
What is this pull request for?
This moves one configuration option from the
Alchemy
module to theAlchemy.config
object. It renames the option fromAlchemy.enable_searchable
which doesn't provide a lot of clarity toAlchemy.show_page_searchable_checkbox
which is somewhat clearer I think.There's also a refactoring in this PR that should prepare the work on the other configuration options in
lib/alchemy.rb
.Notable changes (remove if none)
Alchemy.enable_searchable
.Alchemy.config.show_page_searchable_checkbox
.Checklist