bogdan/datagrid — Issue #18: converting class name to GET param
Author: daddyz
Created: 2012-02-26 07:50:33+00:00
State: open

In my project I have report class located in subdirectory of models directory like 'app/models/reports/users.rb' and a class name for that file is 'Reports::Users'.
Filter form is OK, it makes GET param as 'reports_users[]' but ordering makes it only as 'users'.
As I understand this is because of 'lib/datagrid/active_model.rb' on line 22 'self.to_s.underscore.split('/').last'. It converts it to 'reports/users' and than takes the last only.