Sha256: 6d62e20d14ecd087f31155ab8a9e1ad0e20af3ba2157019a89a10a15a4589eae

Contents?: true

Size: 359 Bytes

Versions: 9

Compression:

Stored size: 359 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 -%>
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
base_editing_bootstrap-0.13.0 lib/generators/base_editing_bootstrap/scaffold/templates/policy.rb.tt
base_editing_bootstrap-0.12.0 lib/generators/base_editing_bootstrap/scaffold/templates/policy.rb.tt
base_editing_bootstrap-0.11.0 lib/generators/base_editing_bootstrap/scaffold/templates/policy.rb.tt
base_editing_bootstrap-0.10.2 lib/generators/base_editing_bootstrap/scaffold/templates/policy.rb.tt
base_editing_bootstrap-0.10.1 lib/generators/base_editing_bootstrap/scaffold/templates/policy.rb.tt
base_editing_bootstrap-0.10.0 lib/generators/base_editing_bootstrap/scaffold/templates/policy.rb.tt
base_editing_bootstrap-0.9.1 lib/generators/base_editing_bootstrap/scaffold/templates/policy.rb.tt
base_editing_bootstrap-0.9.0 lib/generators/base_editing_bootstrap/scaffold/templates/policy.rb.tt
base_editing_bootstrap-0.8.0 lib/generators/base_editing_bootstrap/scaffold/templates/policy.rb.tt