<% @product.photos.each do |p| %>
<%= image_tag p.url(:small) %>
<% end %>

===
Am 4. Februar 2011 17:37 schrieb Werner Laude <newsgr...@wernerlaude.de>:

>
> Am 04.02.2011 um 17:33 schrieb Tobias Weiß:
>
> Hallo Tobias..
>
> glaube die habe ich alle schon durch.... :-(
>
> undefined method `url' for #<SimpleForm::FormBuilder:0x00000101769d80>
>
> Gruß
>
>
> Was ist denn mit image_tag p.url(:small)?
>
> ===
> 2011/2/4 Werner Laude <newsgr...@wernerlaude.de>
>
>> Ich habe
>>
>> class Product < ActiveRecord::Base
>> has_many :photos, :dependent => :destroy
>> accepts_nested_attributes_for :photos, :reject_if => lambda { |t|
>> t['pic'].blank? }, :allow_destroy => true
>>
>> class Photo < ActiveRecord::Base
>> belongs_to :product
>> include Paperclip
>> has_attached_file :pic, :styles => { :small => "150x150>", :large =>
>> "320x240>" }
>>
>>
>> <%= simple_form_for(@product, :html => { :multipart => true }) do |f| %>
>> .....
>> .....
>> <%= f.simple_fields_for :photos do |p|%>
>> <%= image_tag( ????? .url(:small)) %>
>>
>> <%= p.file_field :pic %>
>>
>> Ich möchte gerne vor dem Eingabefeld ein thumb erschein lassen..bekomme es
>> aber nicht hin..
>>
>> Kann mit jemand weiterhelfen?
>>
>> Danke+ Gruß
>>
>> Werner Laude
>> http://www.webagentur-laude.de
>>
>>
>>
>>
>>
>> _______________________________________________
>> rubyonrails-ug mailing list
>> rubyonrails-ug@headflash.com
>> http://mailman.headflash.com/listinfo/rubyonrails-ug
>>
>
> _______________________________________________
> rubyonrails-ug mailing list
> rubyonrails-ug@headflash.com
> http://mailman.headflash.com/listinfo/rubyonrails-ug
>
>
> Werner Laude
> http://www.webagentur-laude.de
>
>
>
>
>
>
> _______________________________________________
> rubyonrails-ug mailing list
> rubyonrails-ug@headflash.com
> http://mailman.headflash.com/listinfo/rubyonrails-ug
>
>
_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug

Antwort per Email an