Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Controllers uses CreatesInterestedPartiesCSV class for CSV
- Loading branch information
1 parent
a8f9652
commit e60faa5
Showing
5 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
class StatusController < ApplicationController | ||
def index | ||
@total_addresses_collected = InterestedParty.total_collected | ||
|
||
|
||
respond_to do |format| | ||
format.html | ||
format.csv { send_data "email_address", type: "text/csv", filename: "foo.csv", } | ||
format.html do | ||
@total_addresses_collected = InterestedParty.total_collected | ||
end | ||
format.csv do | ||
send_data LaunchApp::CreatesInterestedPartiesCSV.for_all, type: "text/csv", filename: "foo.csv" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module LaunchApp | ||
class CreatesInterestedPartiesCSV | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters