Skip to content

Commit

Permalink
Merge pull request leikind#4 from kickbooster/render_text
Browse files Browse the repository at this point in the history
Fix 'render text:' deprecation
  • Loading branch information
patricklindsay authored Jun 22, 2018
2 parents 767aba7 + cc857e4 commit a784212
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Unreleased

* Add option `filter_control_options` to columns. Initial use is to pass in the options `start_year`, `end_year`, and `max_year_allowed` when using `rails_datetime_helper` - [#12](https://github.com/patricklindsay/wice_grid/pull/18)
* Fix deprecation (in Rails 5.0.x) and incorrect behaviour (in Rails 5.1.x) of CSV exports

## 4.0.1 (31 May, 2018)

Expand Down
2 changes: 1 addition & 1 deletion lib/wice/wice_grid_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def send_file_rails2(path, options = {}) #:nodoc:
@performed_render = false

logger.info "Sending file #{path}" unless logger.nil?
File.open(path, 'rb') { |file| render status: options[:status], text: file.read }
File.open(path, 'rb') { |file| render status: options[:status], plain: file.read }
end

DEFAULT_SEND_FILE_OPTIONS_RAILS2 = { #:nodoc:
Expand Down
10 changes: 3 additions & 7 deletions spec/features/csv_export_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
end

it 'should export csv' do
# no idea how to test these

# find(:css, 'button.wg-external-csv-export-button').click

select 'Urgent', from: 'g1_f_priority_id'

# find(:css, 'button.div.clickable.export-to-csv-button').click
find(:css, 'button.wg-external-csv-export-button').click
sleep 1
expect(page.body).to include('ID;Title;Priority;Status;Project Name;')
end
end

0 comments on commit a784212

Please sign in to comment.