Thomas R. Koll schrieb:
Hallo...
danke soweit.. aber das klappt noch nicht..
also:
class Honor < ActiveRecord:Base
has_one :picture
end
class Picture < ActiveRecord:Base
belongs_to :honor
end
@honors = Honor.find(:all)
<%for honor in @honors %>
<%=honor.title %> # wert kommt
<%= honor.picture.image_name %> # ergibt |You have a nil object
oder auch so rum
|
<% @honors.each do |h| -%>
<%= h.picture.image_name %> # ergibt |You have a nil object |
<% end -%>
@ Nicolai => @honor.picture.bildname ??
wo soll das stehen ?
Gruß
--
Werner Laude
Lindenburger Allee 22 | 50931 Köln
0221.8805 635
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.webagentur-laude.de
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug