Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion admin/app/controllers/workarea/admin/help_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ def show
search = Search::RelatedHelp.new(ids: [@help_article.id])
@related = Admin::HelpSearchViewModel.new(search, view_model_options)
@article_body = Redcarpet::Markdown.new(
Redcarpet::Render::HTML.new(hard_wrap: true)
Redcarpet::Render::HTML.new(
hard_wrap: true,
filter_html: true,
safe_links_only: true
)
).render(@help_article.body.to_s)
end

Expand Down
7 changes: 4 additions & 3 deletions admin/app/view_models/workarea/admin/activity_view_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ def scoped_entries
end

if options[:id].present?
Array(options[:id]).each do |id|
criteria = criteria.any_of(
clauses = Array(options[:id]).flat_map do |id|
[
{ audited_id: id },
{ 'document_path.id' => convert_to_object_id(id) }
)
]
end
criteria = criteria.any_of(*clauses) unless clauses.empty?
end

if options[:created_at_greater_than].present?
Expand Down
2 changes: 1 addition & 1 deletion core/app/models/workarea/tax/rate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def self.search(query)
clauses = [{ region: regex }, { postal_code: regex }]
clauses << { country: country } if country.present?

any_of(clauses)
any_of(*clauses)
end

def self.sorts
Expand Down
Loading