store multiple submitter results
This commit is contained in:
@@ -13,7 +13,7 @@ Rails.configuration.to_prepare do
|
||||
|
||||
LoadActiveStorageConfigs.call
|
||||
rescue StandardError => e
|
||||
Rails.logger.debug(e)
|
||||
Rails.logger.error(e)
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
@@ -10,10 +10,16 @@ ActionView::Base.field_error_proc = proc do |html_tag, instance|
|
||||
|
||||
parsed_html_tag = Nokogiri::HTML::DocumentFragment.parse(html_tag)
|
||||
parsed_html_tag.children.add_class 'input-error'
|
||||
# rubocop:disable Rails/OutputSafety
|
||||
html_tag = parsed_html_tag.to_s.html_safe
|
||||
# rubocop:enable Rails/OutputSafety
|
||||
|
||||
result = html_tag
|
||||
result += ApplicationController.helpers.tag.label(ApplicationController.render(partial: 'shared/field_error', locals: { message: "#{field_name} #{errors}" }), class: 'label') if errors.present?
|
||||
|
||||
if errors.present?
|
||||
result +=
|
||||
ApplicationController.render(partial: 'shared/field_error', locals: { message: "#{field_name} #{errors}" })
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
+3
-3
@@ -34,11 +34,11 @@ Rails.application.routes.draw do
|
||||
resources :submissions, only: %i[index new create]
|
||||
end
|
||||
|
||||
resources :start_form, only: %i[show update], path: 'f', param: 'slug' do
|
||||
resources :start_form, only: %i[show update], path: 't', param: 'slug' do
|
||||
get :completed
|
||||
end
|
||||
|
||||
resources :submit_form, only: %i[show update], path: 'l', param: 'slug' do
|
||||
resources :submit_form, only: %i[show update], path: 's', param: 'slug' do
|
||||
get :completed
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ Rails.application.routes.draw do
|
||||
get :success, on: :collection
|
||||
end
|
||||
|
||||
resources :submissions, only: %i[], param: 'slug' do
|
||||
resources :submitters, only: %i[], param: 'slug' do
|
||||
resources :download, only: %i[index], controller: 'submissions_download'
|
||||
resources :debug, only: %i[index], controller: 'submissions_debug'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user