-
Notifications
You must be signed in to change notification settings - Fork 58
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
Adds ignored files as a configurable feature #3434
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<h3><%= t(".title") %></h3> | ||
<p class='lead'> | ||
<%= t ".summary" %> | ||
</p> | ||
<div class="row mb-2"> | ||
<p> | ||
<%= t ".custom_ignore_filters.details" %> | ||
</p> | ||
<%= form.label nil, t(".custom_ignore_filters.label"), for: "files[model_ignored_files]", class: "col-sm-4 col-form-label" %> | ||
<div class="col-sm-8 form-check form-switch"> | ||
<%= form.text_area "files[model_ignored_files]", value: SiteSettings.model_ignored_files.join("\n").gsub(/^\[|\]$/, ""), class: "form-control" %> | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class AddIgnoredFilesToSiteSettings < ActiveRecord::Migration[7.2] | ||
def change | ||
add_column :site_settings, :ignored_files, :text, null: true, default: [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need help figuring out the best way to do this migration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think SiteSettings is a flexible k/v store so you don't actually need to add the migration. But I'll check when I take a proper look at this probably tomorrow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/huacnlee/rails-settings-cached is the gem that it's using, in case those docs help. |
||
/^\.[^\.]+/, # Hidden files starting with . | ||
/.*\/@eaDir\/.*/, # Synology temp files | ||
/__MACOSX/ # MACOS resource forks | ||
] | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Does this need to be a class variable anymore now that we've got
:model_ignored_files
?