Skip to content

Commit

Permalink
fix for mongoid 7
Browse files Browse the repository at this point in the history
  • Loading branch information
scambra committed May 7, 2024
1 parent 8a21df7 commit f3e8ce9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Support loading jquery-ui externally, without jquery-ui-rails gem and ask AS to load JS/CSS for addons based on jquery-ui
- Support usage with importmap
- Add reset_form to search and field_search, when enabled, reset link will clear input fields in the search form, instead of refreshing the list without search and closing the form.
- Fix for mongoid 7

= 3.7.2
- Fix routes
Expand Down
3 changes: 2 additions & 1 deletion lib/active_scaffold/finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,8 @@ def find_page(options = {})
options[:page] ||= 1

find_options = finder_options(options)
query = beginning_of_chain.where(nil) # where(nil) is needed because we need a relation
query = beginning_of_chain
query = query.where(nil) if active_scaffold_config.active_record? # where(nil) is needed because we need a relation

# NOTE: we must use :include in the count query, because some conditions may reference other tables
if options[:pagination] && options[:pagination] != :infinite
Expand Down

0 comments on commit f3e8ce9

Please sign in to comment.