add create support for journals controller

This commit is contained in:
Alexander Meindl 2022-06-16 09:45:35 +02:00
parent 499ede60c5
commit ecf1a30a22
2 changed files with 5 additions and 2 deletions

View File

@ -2,12 +2,15 @@
class AdditionalsJournalsController < ApplicationController class AdditionalsJournalsController < ApplicationController
before_action :find_journal, only: %i[edit update diff] before_action :find_journal, only: %i[edit update diff]
before_action :authorize, only: %i[edit update] before_action :find_entry, only: %i[create]
before_action :authorize, only: %i[create edit update]
helper :custom_fields helper :custom_fields
helper :journals helper :journals
helper :additionals_journals helper :additionals_journals
def create; end
def diff def diff
@entry = @journal.journalized @entry = @journal.journalized
@detail = @detail =

View File

@ -128,7 +128,7 @@ module CrudControllerBase
return if @crud[:create_assert_equals].blank? return if @crud[:create_assert_equals].blank?
@crud[:create_assert_equals].each do |name, value| @crud[:create_assert_equals].each do |name, value|
assert_equal value, entity.send(name) assert_equal value, entity.send(name), "Field #{name} test failed"
end end
end end