Sha256: af48a1012442ecf60a1f4d0351b8eb08904093ec6ccf821ec0de0a0bd7d9a78f

Contents?: true

Size: 461 Bytes

Versions: 1

Compression:

Stored size: 461 Bytes

Contents

require 'ruhl/rails/active_record_presenter'

class RuhlPresenter
  include ActiveRecordPresenter

  attr_reader :presentee, :context
  
  def initialize(obj, context)
    @presentee = obj
    @context = context
    define_paths(obj.class.name.underscore.downcase)
  end
  
end

module ActionController
  class Base    
    def presenter_for(obj)
      eval("#{obj.class.name}Presenter").new(obj,self)
    end
    
    helper_method :presenter_for   
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruhl-0.12.0 lib/ruhl/rails/ruhl_presenter.rb