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 = {
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
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:0x0101769d80
Gruß
Was ist denn mit image_tag p.url(:small)?
===
2011/2/4 Werner Laude newsgr...@wernerlaude.de
Ich habe
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
% @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
Am 04.02.2011 um 17:39 schrieb Daniel Schweighöfer:
p.pic.url(:small) natürlich
nö.. sorry
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|
Am 04.02.2011 um 17:40 schrieb Tobias Weiß:
% @product.photos.each do |p| %
%= image_tag p.url(:small) %
% end %
Hallo Tobias..
alle pics wollte ich nicht zeigen lassen..sondern nur das Bild welches für
jedes Eingabefeld zugeordnet ist..
Gruß
===
Am 4. Februar 2011 17:37 schrieb