Commit Graph

6 Commits

Author SHA1 Message Date
Jeffrey Martin 5e495d72f5 avoid side effects on arguments
When passed arguments as `opts` prefer to avoid side-effects
from method execution.

This extends similar work from #12740
2021-04-13 16:11:09 -05:00
Jeffrey Martin 07cbe426e2 Rails 5, all models inherit from ApplicationRecord
ApplicationRecord is a new superclass for all app models, analogous to app controllers subclassing ApplicationController instead of ActionController::Base. This gives apps a single spot to configure app-wide model behavior.
https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#active-record-models-now-inherit-from-applicationrecord-by-default

Deprecated Relation#uniq use Relation#distinct instead.
https://edgeguides.rubyonrails.org/5_0_release_notes.html#active-record-deprecations
2020-07-31 11:56:49 -05:00
Sliim 95e9707349 Call db event handlers
Implemented plugins handlers defined in
lib/msf/core/database_event.rb:
- on_db_client
- on_db_host
- on_db_service
- on_db_vuln
- on_db_host_state
- on_db_ref
- on_db_service_state
2018-01-21 19:35:55 +01:00
Brent Cook bb0a0b5cd9 apply empty attribute fix in more places, simplify and unify 2017-04-13 22:07:10 -05:00
Christian Catalan 3deac54d3f Convert find_or_initialize_by_X to Rails 4 compatible.
MSP-12018
2015-02-03 16:09:49 -06:00
Luke Imhoff 89d588272e Extract Msf::DBManager::Client
MSP-11124

Extract methods related to `Mdm::Client`s.
2014-10-13 08:27:09 -05:00