p.pic.url(:small) natürlich

Am 04.02.11 17:19, schrieb Werner Laude:
> 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


-- 

Daniel Schweighöfer
Mühlenstraße 20
33098 Paderborn

05251/ 364 22
0151/ 211 58 328
mailto: dan...@netsteward.net
http://netsteward.net
jabber: a...@jabber.ccc.de

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug

Antwort per Email an