Sha256: ca40fc1bd34293fbc68ca8f4533e563a5b703a7aa7f9a3334630149d196085bc
Contents?: true
Size: 557 Bytes
Versions: 9
Compression:
Stored size: 557 Bytes
Contents
module TableHelp module Helper def table_for(collection_or_resource, options = {}) resolve_builder_from(collection_or_resource, options).tap { |this| yield this }.to_html end alias_method :attributes_table_for, :table_for private def resolve_builder_from(collection_or_resource, options) if collection_or_resource.respond_to?(:to_model) AttributesTableFor.new(collection_or_resource, self, options) else TableFor.new(collection_or_resource, self, options) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems