diff --git a/app/controllers/avo/actions_controller.rb b/app/controllers/avo/actions_controller.rb index f7f6bedc3a..6bbc1f1e16 100644 --- a/app/controllers/avo/actions_controller.rb +++ b/app/controllers/avo/actions_controller.rb @@ -19,6 +19,9 @@ def show @view = Avo::ViewInquirer.new("new") @resource.hydrate(record: @record, view: @view, user: _current_user, params: params) + + # Fetch action's fields + @action.fields @fields = @action.get_fields build_background_url diff --git a/lib/avo/base_action.rb b/lib/avo/base_action.rb index 702080d718..5e69d789e4 100644 --- a/lib/avo/base_action.rb +++ b/lib/avo/base_action.rb @@ -120,7 +120,6 @@ def initialize(record: nil, resource: nil, user: nil, view: nil, arguments: {}, self.class.cancel_button_label ||= I18n.t("avo.cancel") self.items_holder = Avo::Resources::Items::Holder.new - fields @response ||= {} @response[:messages] = []