Creation of empty rails 3.1. Template handler

What I want to do is simply to deduce the view and ignore what Rails typically considers inline Ruby inside HTML.

For instance:

<div class="current">
  <div class="question">
   <h3 id="homework_name"><%= homework.name %><h3 id="due">Due <%= homework.due %></h3></h3>
    <h2 class="title">The Question:</h2>
    <p id="question_contents"class="contents"><%= current_question.contents</p>
  </div>
  <div class="answer">
    <h2 class="title">Your Answer:</h2>
    <textarea class="contents" id="student_answer"><%= current_question.answer %></textarea>
  </div>
</div>

I want the ActionView template handler to ignore all references:

  • <%= homework.name %>
  • <%= homework.due %>
  • <%= current_question.contents %>
  • <%= current_question.answer %>

In particular, it should ignore any tags starting with <%and ending with%>

If you need more information check out http://pastie.org/private/epsxnapldho6co2y0indg

+2
source share
1 answer

Here you go https://gist.github.com/1144297

.html.lifo .

+2

All Articles