pake modulus

if id%5 == 0 break line

doni wrote:
>
> kasus ini saya bingung pada saat mengatur photo
>
> yang saya inginkan output photo yaitu seperti ini
>
> (photo)|(photo) |(photo)| (photo)|( photo)| setelah 5 photo maka pindah
> ke baris baru
> (photo)|(photo) |(photo)| (photo)|( photo)|
> (photo)|(photo) |(photo)| (photo)|( photo)|
> (photo)|(photo) |(photo)| (photo)|( photo)|
>
> tapi hasilnya satu baris aja
>
> (photo)|(photo) |(photo)| (photo)|( photo)|(photo) |(photo)| (photo)|( 
> photo)|(photo) |(photo)|
>
> algoritma yang saya dapat :
>
> table
> tr
> td
>
> each.photo do |f|
> print photo.f
>
> if f==5{
>
> print /tr
> print tr
> print td
> }
> end if
> /td
> /tr
> /table
>
> yang saya bingung pada saat koding railsnya ...
> mohon bantuan untuk kodingnya
>


-- 
irfani

http://irfani.web.id
Y! irfani_s



[Non-text portions of this message have been removed]

Kirim email ke