Skip to content

Commit

Permalink
Plugin is now compatible with Rails 2.2. [AlexJWayne#8 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexJWayne committed Dec 12, 2008
1 parent a8c55bd commit 1ed1b45
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/fleximage/view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ class View < ActionView::TemplateHandler #:nodoc:
class TemplateDidNotReturnImage < RuntimeError #:nodoc:
end

def self.call(template)
"Fleximage::View.new(self).render(template)"
end

def initialize(action_view)
@view = action_view
end

def render(template)
# process the view
result = @view.instance_eval do
Expand Down

0 comments on commit 1ed1b45

Please sign in to comment.