Skip to content

Commit

Permalink
chore: expose query to scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev committed Dec 24, 2023
1 parent 54f559c commit 7d525a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/components/avo/views/resource_index_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ def scopes_list
scopes: scopes,
resource: resource,
turbo_frame: turbo_frame,
parent_record: parent_record
parent_record: parent_record,
query: query
)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/avo/templates/scope.tt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Avo::Scopes::<%= class_name.camelize %> < Avo::Pro::Scopes::BaseScope
self.name = "<%= name.underscore.humanize %>"
self.description = "<%= name.underscore.humanize %>"
# self.description = "<%= name.underscore.humanize %> description."
self.scope = -> { query.all }
self.visible = -> { true }
end

0 comments on commit 7d525a3

Please sign in to comment.