Sha256: 8356ee15aadf74a1f29ab650fdb5135cce1322be8ad7a21c5e1985a8fd96a803
Contents?: true
Size: 467 Bytes
Versions: 1
Compression:
Stored size: 467 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, @template) end helper_method :presenter_for end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruhl-0.12.1 | lib/ruhl/rails/ruhl_presenter.rb |