-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hallo Werner,
bei Toms Vorschläge musst du dann natürlich auch die Schleife über
alle Fotos weglassen. Also so aus
<% for photo in client.photos %>
<%= image_tag photo.premium.url(:medium) %>
<% end %>
mach
<%= image_tage client.key_photo.premium.url(:medium) %>
Dann sollte nur auch ein Foto angezeigt werden.
Viele Grüße
Gregor
On 13.04.2010, at 22:28, Werner Laude wrote:
Am 13.04.2010 um 22:00 schrieb Thomas R. Koll:
hallo Tom
Client
has_many :photos, :order => 'id ASC'
<%= image_tag client.photos.first.premium.url(:medium) %>
da zeigt er dann die ersten 2 mal an..;-)
has_many :photos, :order => 'id ASC', :limit =>1
klappt, allerdings benötige ich woanders die beiden Bilder...
Morgen mal weiterforschen..bin jetzt zu müde
Soweit danke
ciao, tom
Am 13.04.2010 um 21:55 schrieb Werner Laude:
Hallo .. brauche einen Tipp.
<% for photo in client.photos %>
<%= image_tag photo.premium.url(:medium) %>
<% end %>
Da sind 1-2 Bilder drin
Will aber nur das erste(nach id) anzeigen lassen
Hoffe ich habe mich verständlich ausgedrückt..
--
Thomas R. "TomK32" Koll
just a geek trying to change the world
http://ananasblau.com || http://photostre.am || http://photolog.at
_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug
Werner Laude
newsgr...@wernerlaude.de
_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug
- --
Gregor Schmidt
schm...@nach-vorne.eu
www.nach-vorne.eu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkvFdc4ACgkQEA6PB4V2Ye+4SgCeLiuYt2KjTjLthYwly+iwVU4e
07sAoIXh7edoIpj2WgsGJ01Gxb9Cpdoj
=56QG
-----END PGP SIGNATURE-----
_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug