Topic: Rendering a file

This seems like it should be quite simple and I'm sure I've read something about how to do this in the past, but I can't for the life of me remember what to look for now.

Basicly, what I want to do is render a log file into a view. can someone remind me what it is I should be using to do that?

cheers for any help.

Re: Rendering a file

Assuming you don't want an updater, which you will have to look elsewhere for, because I'm not knowledable in those areas.

def log
  @log = `cat logfile`

and print @log in your view.  Anything you put between `'s (they are the same character on the tilde key) will be evaluated by the shell and returned to your code.

Re: Rendering a file

thanks.. that did the trick. It was the tildes I was forgetting.

Re: Rendering a file

They're called backticks actually, a tilde is this: ~ smile

vinnie - rails forum admin