Sha256: 895e5e5f18968d548e9d1a550252bdd497584f1be855003c2daf8bd5aaf38a82

Contents?: true

Size: 190 Bytes

Versions: 1

Compression:

Stored size: 190 Bytes

Contents

class Test::CustomerPolicy < Tram::Policy
  option :name

  validate :name_presence

  private

  def name_presence
    return if name
    errors.add :name_presence, field: "name"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tram-policy-0.1.1 spec/fixtures/customer_policy.rb