Skip to content

Commit

Permalink
Merge pull request #197 from colinramsay/csv-association-filter-fix
Browse files Browse the repository at this point in the history
Fix CSV export when filtering on an association
  • Loading branch information
leikind committed Feb 4, 2015
2 parents 7981c96 + 32bd7c4 commit 9b6f448
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/wice_grid.rb
Expand Up @@ -304,13 +304,15 @@ def read #:nodoc:
form_ar_options
@klass.unscoped do
@resultset = if self.output_csv? || all_record_mode?
@relation.
relation = @relation.
includes(@ar_options[:include]).
joins( @ar_options[:joins]).
order( @ar_options[:order]).
group( @ar_options[:group]).
where( @ar_options[:conditions])

relation = add_references relation

relation
else
# p @ar_options
relation = @relation.
Expand Down

0 comments on commit 9b6f448

Please sign in to comment.