Forum: Ruby on Rails Txt response information

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A9f0c7c44434d7d182c299693ef9be60?d=identicon&s=25 String numecal validate! (Guest)
on 2006-05-08 23:53
I need response page in txt not in HTML.
How I can response information in txt?



Thank's
Bruno
Cf7e5e4b5ca573eec214191fac420a2f?d=identicon&s=25 Dave Silvester (Guest)
on 2006-05-09 00:20
(Received via mailing list)
On Monday 08 May 2006 22:53, String numecal validate! wrote:
> I need response page in txt not in HTML.
> How I can response information in txt?

In your controller action:

headers['Content-Type'] = 'text/plain'
render :layout => false

Cheers,

~Dave

--

Dave Silvester
Rent-A-Monkey Website Development
http://www.rentamonkey.com/

PGP Key: http://www.rentamonkey.com/pgpkey.asc
24d2f8804e6bb4b7ea6bd11e0a586470?d=identicon&s=25 Jeremy Kemper (Guest)
on 2006-05-09 00:23
(Received via mailing list)
On May 8, 2006, at 2:53 PM, String numecal validate! wrote:
> I need response page in txt not in HTML.
> How I can response information in txt?

Set the content type header to 'text/plain' in your action.

Please be mindful that the ruby forum is mirrored to a mailing list -
"throwaway" questions like this really clog up the works.

Thanks,
jeremy
This topic is locked and can not be replied to.