class SeaFood::Form
def promote_errors(model)
def promote_errors(model) SeaFood::Error.new(model.errors.full_message, model.errors) end
def save(options = {})
def save(options = {}) model.save(**options) if valid? end
def save!(options = {})
def save!(options = {}) model.save!(**options) if valid? end
def validate(options = {})
def validate(options = {}) valid? && validate_model(options) end
def validate_model
def validate_model promote_errors(model) if model.invalid? end