Hi everyone here is one to give your minds a little work out
Ok I have this code
and if I try and select all the BriefImageVersion (s) I find that as the BriefImageVersion class is dynamically created within acts_as_versioned.rb and therefore doesn't have the file_column plugin installed.Code:require 'acts_as_versioned' class BriefImage < ActiveRecord::Base file_column :image, :magick => { :versions => { "thumb" => "100x100", "standard" => "640x480" } } acts_as_versioned :foreign_key => 'brief_image_id' end
this leaves me with errors like the following
now what im wanting to try and do is create the brief_image_versions array then add the file_column plugin to them (after creation)Code:ActionView::TemplateError (undefined method `image_relative_path' for #<BriefImage::Version:0xb79693ec>)
so something like
only problem is that Ive got no idea how this can be (or if for that matter).Code:@versions = brief_image.get_all_versions @versions.first.add(file_column)
any help would be really appreciated
thanks alistair




Bookmarks