A PHP Error was encountered

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/asgaardc/luminous/system/core/Exceptions.php:170)

Filename: libraries/Session.php

Line Number: 671

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/asgaardc/luminous/system/core/Exceptions.php:170)

Filename: libraries/Session.php

Line Number: 671

Luminous PHP Syntax Highlighter - Short Rails example from the RoR guide
Fork me on GitHub

Short Rails example from the RoR guide

499 bytes of Ruby on Rails by mark

12345678910111213141516171819202122232425
<h1>Listing Books</h1>
 
<table>
  <tr>
    <th>Title</th>
    <th>Summary</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>
 
<% @books.each do |book| %>
  <tr>
    <td><%= book.title %></td>
    <td><%= book.content %></td>
    <td><%= link_to 'Show', book %></td>
    <td><%= link_to 'Edit', edit_book_path(book) %></td>
    <td><%= link_to 'Remove', book, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>
 
<br />
 
<%= link_to 'New book', new_book_path %>