I am trying to study rails while doing some lab work in railsforzombies, I am in lab3 (if statements).
It has two tables:
- Zombies {id, name, cemetery}
- Tweets {id, status, zombie_id}
Target In each block, if Zombie has more than 1 tweet, print SMART ZOMBIE
<% zombies = Zombie.all %> <ul> <% zombies.each do |zombie| %> <li> <%= zombie.name %> # add if statement here </li> <% end %> </ul>
I tried some solutions, but I'm wrong.
ruby-on-rails
SHUMA
source share