Sha256: b78736c54f24fc780425a76a954d6ace699a026d39fe8b486cb05623f4658d76

Contents?: true

Size: 561 Bytes

Versions: 3

Compression:

Stored size: 561 Bytes

Contents

module NewspaperWorks
  class NewspaperCoreFormData < Hyrax::Forms::WorkForm
    self.terms += [:resource_type, :place_of_publication, :issn, :lccn,
                   :oclcnum, :held_by]
    self.terms -= [:based_near, :date_created, :keyword, :related_url, :source]
    self.required_fields += [:resource_type, :language, :held_by]
    self.required_fields -= [:creator, :keyword, :rights_statement]

    def self.build_permitted_params
      super + [
        {
          place_of_publication_attributes: [:id, :_destroy]
        }
      ]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newspaper_works-1.0.1 app/forms/newspaper_works/newspaper_core_form_data.rb
newspaper_works-1.0.0 app/forms/newspaper_works/newspaper_core_form_data.rb
newspaper_works-0.1.0 app/forms/newspaper_works/newspaper_core_form_data.rb