Sha256: 876ca55cc771b5db95584cb571a162d06b8059bcf0a3532dbd32c1a300432caf

Contents?: true

Size: 146 Bytes

Versions: 9

Compression:

Stored size: 146 Bytes

Contents

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tram-policy-2.2.0 spec/fixtures/customer_policy.rb
tram-policy-2.1.0 spec/fixtures/customer_policy.rb
tram-policy-2.0.1 spec/fixtures/customer_policy.rb
tram-policy-2.0.0 spec/fixtures/customer_policy.rb
tram-policy-1.0.1 spec/fixtures/customer_policy.rb
tram-policy-1.0.0 spec/fixtures/customer_policy.rb
tram-policy-0.4.0 spec/fixtures/customer_policy.rb
tram-policy-0.3.1 spec/fixtures/customer_policy.rb
tram-policy-0.3.0 spec/fixtures/customer_policy.rb