Sha256: 1d99f4f3291a84b50edc155ba7d81139186224fb42d8b7cf640a0c8e3ed6c76a
Contents?: true
Size: 475 Bytes
Versions: 1
Compression:
Stored size: 475 Bytes
Contents
<% module_namespacing do -%> class <%= class_name %>Policy < <%= [feature_package_name, "ResourcePolicy"].join "::" %> # Core actions def create? true end def read? true end # Core attributes def permitted_attributes_for_create <%= (class_name.constantize.resource_field_names - [:created_at, :updated_at]).inspect %> end def permitted_attributes_for_read <%= class_name.constantize.resource_field_names.inspect %> end end <% end -%>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
plutonium-0.6.2 | lib/generators/pu/resource/model/templates/policy.rb.tt |