Ruby on Rails Thursday, October 13, 2016

On 13 October 2016 at 03:17, kinoe - <kinoe48@gmail.com> wrote:
this code:
<h1>Artikel#index</h1>

<% if @save.blank? %>
<p>data nothing</p>
<br>
<%= link_to "buat baru", artikel_new_path %>
<% else %>

<table border="1px">
 <tr>
  <td width="80px">Title</td>
  <td width="100px">Isi</td>
  <td width="50px">Desc</td>
  </tr>

<%= @save.each do |ss| %>


You have <%= instead of <%  so it is displaying the return value from the line.  Try it without the =

Colin

 
  <tr>
  <td><%= ss.title %></td>
  <td><%= ss.isi %></td>
  <td><%= link_to "Desc", {:action => "show",:id => ss.id} %></td>
  </tr>
<% end %>
</table>
<br><br>
<% end %>
  
<%= link_to "buat baru", artikel_new_path %>




 

--
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/9fb2fe04-e761-48f1-affb-488b44cdfbd4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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/CAL%3D0gLs335cAmt5xWKCqeTCvtPAGR1gfoV1RY1XR%2B2SrX1hehw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment