Skip to content

Commit

Permalink
Update WorkResourceGenerator
Browse files Browse the repository at this point in the history
This update will add the with_pdf_viewer and with_video_embed includes
to the generated forms.
  • Loading branch information
kirkkwang committed May 16, 2024
1 parent 1962a47 commit 20aca2c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ def insert_hyku_extra_includes_into_model
end
end

def insert_hyku_extra_includes_into_form
form = File.join('../app/forms/', class_path, "#{file_name}_form.rb")
insert_into_file form, after: "include Hyrax::FormFields(:#{file_name})\n" do
" include Hyrax::FormFields(:with_pdf_viewer)\n" \
" include Hyrax::FormFields(:with_video_embed)\n"
end
end

private

def rspec_installed?
Expand Down

0 comments on commit 20aca2c

Please sign in to comment.