Sha256: 063809fcbf1ca6318d2d5cdf8ea6b6cd34000aacf50a6b5c3f5557b4f8ec73c5
Contents?: true
Size: 546 Bytes
Versions: 10
Compression:
Stored size: 546 Bytes
Contents
class <%= class_name %>Policy < BaseModelPolicy def editable_attributes = %w[<%= attributes_names.join(" ") %>] def permitted_attributes = %w[<%= attributes_names.join(" ") %>] def search_result_fields = %w[<%= attributes_names.join(" ") %>] <%- if @search_attrs.any? -%> def search_fields %i[<%= @search_attrs.join(" ") %>] end <%- end -%> <%- if @permitted_attributes.any? -%> # TODO check if correct with search_fields def permitted_attributes_for_ransack %w[<%= @permitted_attributes.join(" ") %>] end <%- end -%> end
Version data entries
10 entries across 10 versions & 1 rubygems