output fleximage image from DB?

Here's the documentation for a start, I've been using FlexImage for a while now

http://wiki.github.com/Squeegy/fleximage

Since the latest code is for RESTful style controllers/views, etc. You'd do something like this in your view that you're placing your image in.

@image = Image.find(:first)

<%= image_tag formatted_image_path(@image, :jpg) %>

This would generate something like this...

<img src="/images/1.jpg" />

which would map to the ImagesController, something like...

class ImagesController < ApplicationController

def show   @image = Image.find(params[:id]) end

end

this would then render the flexi template which might then look like this.

app/views/images/show.jpg.flexi: @image.operate do |i|   i.resize '200' end

I hope this helps or at least the documentation link does.

RobL http://www.robl.me

Taylor Strait wrote:

Going to the image directly by /questions/show/1.jpg yields the following error:

NoMethodError in QuestionsController#show

undefined method `call' for Fleximage::View:Class

Taylor Strait wrote:

Going to the image directly by /questions/show/1.jpg yields the following error:

NoMethodError in QuestionsController#show

undefined method `call' for Fleximage::View:Class

This continues to be my sticking point. The server throws these errors silently. More info on the error:

NoMethodError (undefined method `call' for Fleximage::View:Class):

    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:21:in `_unmemoized_compiled_source'

This is on Rails 2.2.2. When installing I also had to change this line in plugins/fleximage/init.rb

FROM ActionView::Base.register_template_handler :flexi, Fleximage::View

TO ActionView::Template.register_template_handler :flexi, Fleximage::View

So I wonder if there are other issues at work. Anyone on Edge rails running fleximage ok? I can get the images to work when I use embedded_image_tag but have had issues with image corruption really blowing up my app. (have to drop the row from DB) Man, you spend more time troubleshooting and shoehorning plugins than you do just writing the functions from scratch!