[Rails] Re: Log Files in View
Alex MacCaw
maccmania at gmail.com
Wed Mar 1 16:40:26 GMT 2006
Norman Timmler wrote:
> Am Dienstag, den 28.02.2006, 21:34 +0100 schrieb Alex MacCaw:
>> Is it possible to display the log files in the view?
>> Thanks in advance.
>
> Rails views are ERB files and inside you can do anything what is doable
> with ruby.
>
> If you want to display the current log file for example:
>
> <%= File.open("#{RAILS_ROOT}/log/#{RAILS_ENV}.log") { |f| f.read } %>
>
> --
> Norman Timmler
>
> http://blog.inlet-media.de
Thanks,
Also what would be the commands to clear the log file?
--
Posted via http://www.ruby-forum.com/.
More information about the Rails
mailing list