mercredi 11 février 2015

How can I implement .try method on looping checkbox?

Hi @MarekLipka according to your answer here Rails: Display user name, if user not exist, display 'Anonymous' Instead


I wanna ask, How can I implement .try method on looping checkbox like this:



<% @post.categories.each do |obj| %>
<%= obj.name %>
<% end %>


How can I do it?





Aucun commentaire:

Enregistrer un commentaire