Class: QuickbooksWebConnector::QwcController

Inherits:
QuickbooksWebConnectorController show all
Defined in:
app/controllers/quickbooks_web_connector/qwc_controller.rb

Instance Method Summary collapse

Instance Method Details

#downloadObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/quickbooks_web_connector/qwc_controller.rb', line 4

def download
  @user = QuickbooksWebConnector.config.users[params[:username]]

  if !@user
    head :not_found
  else
    send_data render_to_string(:qwc),
              disposition: 'attachment',
              filename: "#{@user.username}.qwc",
              type: :xml
  end
end