add create support for journals controller
This commit is contained in:
parent
499ede60c5
commit
ecf1a30a22
@ -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 =
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user