People,
I have a simple rails web site and I have been creating some of the
content files with HTML but thought I should be able to write them using
Textile instead. eg I have an index file:
index.html.erb
that has links in it of the form:
Description
I have been looking around for hours but can’t find anything that helps
- I can do textilize with fields retrieved from database records but
can’t see how to do it with content of URL files.
I presume it is possible? How?
Thanks,
Phil.
Philip R.
GPO Box 3411
Sydney NSW 2001
Australia
E-mail: [email protected]
–
You received this message because you are subscribed to the Google
Groups “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Philip R. wrote:
Description
This link will return the page/file directly to the browser. It will not
involve your Rails application at all (unless, of course, this URL is
routed to a controller action). Web browsers do not understand Textile.
They are designed to render HTML.
I have been looking around for hours but can’t find anything that helps
- I can do textilize with fields retrieved from database records but
can’t see how to do it with content of URL files.
I presume it is possible? How?
Of course, you can textilize fields from a database and return the
resulting HTML to the browser, which will render the HTML it receives.
Textile is designed to simplify formatting from end users. The Textile
strings must be converted into HTML before the browser can render them.
I suppose you could write some content in Textile. Then run the content
through a conversion to HTML. At that point you can store the HTML on
your server and link to that. But. that gains you nothing really. You
might as well write the content in HTML and be done with it. If you know
Textile it’s not a big step to get the same thing in HTML.
Textile < HTML. This makes learning, and writing, the HTML trivial.