Sha256: e388e2248c39c9a846e203f64b51229386356208558525203358eced09e20164
Contents?: true
Size: 547 Bytes
Versions: 10
Compression:
Stored size: 547 Bytes
Contents
<% module_namespacing do %> class <%= class_name %>TabulatrData < Tabulatr::Data <% attributes = attributes_names %> <% if class_name.constantize.table_exists? %> <% attributes << class_name.constantize.column_names.map(&:to_sym) %> <% end %> <% attributes = attributes.flatten.uniq %> <% if attributes.any? %> search :<%= attributes.last %> <% end %> <% attributes.each do |a| %> column :<%= a %> <% end %> <% association_names.each do |attribute| %> association :<%= attribute %>, :id <% end %> end <% end %>
Version data entries
10 entries across 10 versions & 1 rubygems