lib/avo/base_action.rb in avo-2.7.1.pre.1 vs lib/avo/base_action.rb in avo-2.8.0

- old
+ new

@@ -1,20 +1,20 @@ module Avo class BaseAction - extend FieldsCollector extend HasContext + include Avo::Concerns::HasFields + class_attribute :name, default: nil class_attribute :message class_attribute :confirm_button_label class_attribute :cancel_button_label class_attribute :no_confirmation, default: false class_attribute :model class_attribute :view class_attribute :user class_attribute :resource - class_attribute :fields class_attribute :invalid_fields class_attribute :standalone, default: false class_attribute :visible class_attribute :may_download_file, default: false @@ -147,9 +147,16 @@ self end def warn(text) add_message text, :warning + + self + end + + # Add a placeholder silent message from when a user wants to do a redirect action or something similar + def silent + add_message nil, :silent self end def redirect_to(path = nil, &block)