Ruby on Rails Tuesday, November 4, 2014



On Tuesday, November 4, 2014 1:23:48 AM UTC, Chris Kacerguis wrote:
Hello All,

I'm pretty new to Rails / Ruby development, so please bear with me if this is a RTFM question.

I'm trying to output ruby snippets (snippets are stored in a file) in my view, but erb/rails keeps trying to parse the code.  Is there any way I can get Rails to not to parse the Ruby and just output it as text?

I hope that makes sense.


if it's not in <% tags then it should be output as is (although you may need to escape it to stop the browser interpreting as malformed html - depending on how you are including these snippets this might be done automatically)

Fred

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fa8acfed-7d2b-4158-a29f-ec17d7cc53c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment