Hi Werner,
dein File.join sieht merkwürdig aus. Das Ergebnis ist etwas wie "**//images/deko/*.jpg" und macht nicht viel Sinn. Was du brauchst ist ein 'find'.

require 'find'

Find.find("<dein_pfand>") do |file_name|
 if file_name.include?("*.jpg")
   ...
 end
end

Grüße, Alex



Werner Laude wrote:
Manuel Wiedenmann schrieb:
Hallo Werner,

lass mal das = vor dem for weg, also so:

<% for pic in @pictures %>
<%= pic %>
<% end %>

der hat das so versucht als string auszugeben...

oh ja.. das ist nicht gut..#
allerdings bekomme ich jetzt nur ein nil object

Muß ich den Pfad anders beschreiben ? ist das unterschiedlich evt. unter Windows?

pic = File.join("**", "/images/deko", "*.jpg")
  @pictures = Dir.glob(pic)

Gruß

------------------------------------------------------------------------

_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

Antwort per Email an