Sha256: 9ba733ddd1a469b56683f940d66f39587b43f3b30ec0155556cff0c715250cac
Contents?: true
Size: 567 Bytes
Versions: 3
Compression:
Stored size: 567 Bytes
Contents
module Rabl module Partials include Helpers include Sources def partial_as_engine(file, options = {}, &block) raise ArgumentError, "Must provide an :object option to render a partial" unless options.has_key?(:object) object = options.delete(:object) view_path = options[:view_path] || view_path source, location = fetch_source(file, :view_path => view_path) options = options.merge(:source => source, :source_location => location, :template => file) object_to_engine(object, options, &block) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rabl-0.11.4 | lib/rabl/partials.rb |
rabl-0.11.3 | lib/rabl/partials.rb |
rabl-0.11.2 | lib/rabl/partials.rb |