breakthroughmenscommunity/bmc

View on GitHub
app/models/plain_model.rb

Summary

Maintainability
A
0 mins
Test Coverage
class PlainModel
  include Virtus.model
  include ActiveModel::Model
  include ActiveSupport::Callbacks
  include ActiveModel::Validations::Callbacks

  define_callbacks :save

  def save
    if valid?
      run_callbacks :save do
        true
      end
    else
      false
    end
  end
end