Sha256: 1144dedf2bd516a63d2561f7d58150f9813bbdf11c4f29333f58ca7546a6fe26

Contents?: true

Size: 163 Bytes

Versions: 8

Compression:

Stored size: 163 Bytes

Contents

class Order < ActiveRecord::Base

  before_save do |row|
    return true  unless row.name == 'error'

    row.errors.add :base, 'panic'
   return false
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rows_controller-0.4.4 spec/dummy/app/models/order.rb
rows_controller-0.4.3 spec/dummy/app/models/order.rb
rows_controller-0.4.2 spec/dummy/app/models/order.rb
rows_controller-0.4.1 spec/dummy/app/models/order.rb
rows_controller-0.3.2 spec/dummy/app/models/order.rb
rows_controller-0.2.4 spec/dummy/app/models/order.rb
rows_controller-0.2.3 spec/dummy/app/models/order.rb
rows_controller-0.1.0 spec/dummy/app/models/order.rb