Sha256: b263c4ee793066bc1d0afd15cc29def4930313e1d0f5cb05868f1e4a074d76c9
Contents?: true
Size: 791 Bytes
Versions: 2
Compression:
Stored size: 791 Bytes
Contents
# frozen_string_literal: true module WorksCited # Concern to allow strong parameters when using accepts_nested_attributes_for to edit Cookbook Uses module Params extend ActiveSupport::Concern included do # rescue_from Pundit::NotAuthorizedError, with: :authorization_error # include Pundit end def works_cited_params { works_cited_citations_attributes: [ :id, :citation_type, :title, :container_title, :publisher, :city, :edition, :volume, :number, :series, :year, :record, :media, :url, :pages, :published_at, :online_database, :doi, :accessed_at, :_destroy, { works_cited_contributors_attributes: %i[id contributor_role first middle last suffix handle _destroy] } ] } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
works_cited-0.1.16 | app/controllers/concerns/works_cited/params.rb |
works_cited-0.1.15 | app/controllers/concerns/works_cited/params.rb |