Sha256: 42be2c9b91a56e1fec3442c88a5cdc0e851ad4759575365ce14e53f1c9e280d0
Contents?: true
Size: 542 Bytes
Versions: 12
Compression:
Stored size: 542 Bytes
Contents
# makes the shorthand <%= render @posts %> work # for collections of DataMapper objects module ActionView module Partials alias :render_partial_orig :render_partial private def render_partial(options = {}) if DataMapper::Collection === options[:partial] collection = options[:partial] options[:partial] = options[:partial].first.class.to_s.tableize.singular render_partial_collection(options.merge(:collection => collection)) else render_partial_orig(options) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems