Skip to content

Commit

Permalink
fix: fetch cards only when necessary (#2454)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob authored Feb 6, 2024
1 parent 2f01da3 commit b5f0efa
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/avo/base_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,15 @@ def fetch_fields
fields
end

def fields
# blank fields method
def fetch_cards
cards
end

# def fields / def cards
[:fields, :cards].each do |method_name|
define_method method_name do
# Empty method
end
end

[:action, :filter, :scope].each do |entity|
Expand Down

0 comments on commit b5f0efa

Please sign in to comment.