Answer the question
In order to leave comments, you need to log in
Why doesn't erb parse the template?
For some reason, the erb template is not processed:
require 'sinatra'
require 'movie'
get('/movies') do
@movie = Movie.new
@movie.title = 'Jaws'
erb :index
end
<div class="container">
<h2 class="text-center p-3 my-3 bg-primary text-white"> Movies <h2>
<ul class="list-group">
<li class="list-group-item list-group-item-success"><%= Time.now %></li> // выдаст дословно Time.now
<li class="list-group-item list-group-item-info"><%= 6 / 3 %></li> // результат не будет выведен
<li class="list-group-item list-group-item-warning"><%= @movie.title %></li> //болты))
<li class="list-group-item list-group-item-danger">go</li>
<li class="list-group-item list-group-item-primary">here</li>
</ul>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question