Fleximage syntax error


#1

Hi,
I am getting the following error message when using fleximage:

undefined method data' for classStockimagestbl’
{RAILS_ROOT}/vendor/plugins/flex_image/lib/flex_image/model.rb:71:in
alias_method' {RAILS_ROOT}/vendor/plugins/flex_image/lib/flex_image/model.rb:71:inbinary_column’
{RAILS_ROOT}/app/models/stockimagestbl.rb:4
{RAILS_ROOT}/app/controllers/unregistered_controller.rb:21:in `artist’

My code is as follows:

Map:

class Stockimagestbl < FlexImage::Model
set_primary_key “item_code”
belongs_to :stocktbl,
:foreign_key => “stock_id”
binary_column :item_photo

end

Controller:

class UnregisteredController < ApplicationController

def artist
@artistImage =
Stockimagestbl.find(“2221bc21-0ce2-11db-abe1-000c6e65312d”)
end

View:
<%= image_tag url_for(:controller => ‘unregistered’, :action =>
‘artist’,
:id => @artistImage) %>

My postgreSQL (8.2) table (Stockimagestbl) structure is comprised of the
following columns:

1.item_code: Primary Key
2.item_photo: bytea

What am I overlooking here?


Regards

Andrew