Skip to content

Commit

Permalink
receive error in document url
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Gupta(mac) committed Apr 17, 2012
1 parent faa6ecf commit 8731581
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/controllers/transactions_controller.rb
Expand Up @@ -31,7 +31,6 @@ def show
# POST /transactions.xml
def create
@transaction = Transaction.new(params[:transaction])

respond_to do |format|
if @transaction.save
format.html { redirect_to(@transaction, :notice => 'Transaction was successfully created.') }
Expand Down
2 changes: 1 addition & 1 deletion app/views/transactions/receive.xml.builder
Expand Up @@ -4,7 +4,7 @@ xml.transaction do
xml.id(@transaction.id)
xml.status("Document found Successfully")
xml.creation_date(@transaction.created_at.to_date)
xml.document_url("#{request.env['HTTP_HOST']}/public#{@document.doc.url(:original, false)}")
xml.document_url("#{request.env['HTTP_HOST']}#{@document.doc.url(:original, false)}")
else
xml.error("Document not found")
xml.message("Two parameters required: transaction[receiver_mobile] and transaction[document_code]")
Expand Down

0 comments on commit 8731581

Please sign in to comment.