Permalink
Browse files

fixed error for viable_models method

there are three nested levels
and the `m` in reject block is an array
which will throw `NoMethodError` for
undefined method `starts_with?' for #<Array:0x007fc424a31a98>
  • Loading branch information...
1 parent d55b6a8 commit f15e0c9d789bfc70ed5f5d2aa9a46f237d42e575 @yangchenyun yangchenyun committed Mar 7, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rails_admin/config.rb
@@ -314,7 +314,7 @@ def viable_models
end
end
end
- end.reject { |m| m.starts_with?('Concerns::') } # rubocop:disable MultilineBlockChain
+ end.flatten.reject { |m| m.starts_with?('Concerns::') } # rubocop:disable MultilineBlockChain
)
end

0 comments on commit f15e0c9

Please sign in to comment.