From: Fernando Perez Date: 2010-07-30T18:40:56+09:00 Subject: Re: Problem with a lambda not executing immediately > Given that the key in the hash is > :processors (in plural) I would assume that the value should be an > array of processors. Yes style.processors is expected to be an array > So, even if you only have one lambda, can you try this: > > class Asset < ActiveRecord::Base > has_attached_file :data, :styles => { > :theora => [:format => :ogv, :processors => [lambda {|a| a.video? > ? [:video_converter] : []}]}] > } Unfortunately it doesn't work, as when the lambda gets executed, the "a" object it receives is not the not it expects: "wrong constant name passed". -- Posted via http://www.ruby-forum.com/.