lib/avo/base_action.rb in avo-3.0.0.pre8 vs lib/avo/base_action.rb in avo-3.0.0.pre9
- old
+ new
@@ -57,13 +57,13 @@
self.class.to_s.demodulize.underscore.humanize(keep_id_suffix: true)
end
def initialize(record: nil, resource: nil, user: nil, view: nil, arguments: {})
- self.class.record = record if record.present?
- self.class.resource = resource if resource.present?
- self.class.user = user if user.present?
- self.class.view = view if view.present?
+ self.class.record = record
+ self.class.resource = resource
+ self.class.user = user
+ self.class.view = view
@arguments = arguments
self.class.message ||= I18n.t("avo.are_you_sure_you_want_to_run_this_option")
self.class.confirm_button_label ||= I18n.t("avo.run")
self.class.cancel_button_label ||= I18n.t("avo.cancel")