I am currently developing with ruby for the first time.
Can you see why i keep getting the following errors:
/home/apple/Desktop/homework/app/views/specialization/index.html.erb:36: syntax error, unexpected keyword_ensure, expecting keyword_end
/home/apple/Desktop/homework/app/views/specialization/index.html.erb:38: syntax error, unexpected $end, expecting keyword_end
Extracted source (around line #36):
31: </tabel>
32: </body>
I try to access a database with ruby and read some simple specialization tuples..
This is my page code:
<html>
<head>
</head>
<body>
<table border=1>
<tr>
<td>Specialization</td>
<td>Number of applicants</td>
<td>Applicants</td>
</tr>
<% Specialization.all.each do |s| %>
<tr>
<td> <%= s.title %> </td>
<td>
<table>
<td>applicant1</td>
<td>applicant2</td>
</table>
</td>
<td><button type="button">Click Me!</button> </td>
</tr>
</tr>
<% end >
</tabel>
</body>
Thank you very much!
Lets see
should be
And you shouldn’t be selecting the model in the view like this
You should find the specializations in your index action in the controller
And in the view