Skip to content

Commit 3ad4078

Browse files
ksemuldieelia
authored andcommitted
Add ransack support
solves #49
1 parent 190abcb commit 3ad4078

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/active_admin/mongoid/document.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,17 @@ def group_by *args
6767
scoped
6868
end
6969

70+
def ransack *args
71+
scoped
72+
73+
scoped.class.class_eval do
74+
def result
75+
self
76+
end
77+
end
78+
79+
scoped
80+
end
7081

7182

7283
# Cache

0 commit comments

Comments
 (0)