• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DavyJonesLocker / client_side_validations / 286 / 1
72%
main: 100%

Build:
Build:
LAST BUILD BRANCH: bugfix/997-proc-validations
DEFAULT BRANCH: main
Ran 02 Apr 2013 09:46PM UTC
Files 55
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Apr 2013 09:46PM UTC coverage: 97.327% (+0.03%) from 97.301%
1.9.3

Pull #520

travis-ci

arr-ee
Added ability to override class name for uniqueness validator

Added `:client_validations` option to the `validate_uniqueness_of`,
where one can specify the real class name for the remote validation.

For example, we have a wrapper class for the User model, UserForm, and
it uses remote uniqueness validation for the email field.

```
class UserForm
  include ActiveRecord::Validations
  attr_accessor :email
  validates_uniqueness_of :email
end
```

However, this won't work since middleware will try to perform validation
against UserForm, and it's not persisted.

Now one can state which class should be used for validation:

```
class UserForm
  include ActiveRecord::Validations
  attr_accessor :email
  validates_uniqueness_of :email, :client_validations => { :class =>
  User }
end
```
Pull Request #520: Added ability to override class name for uniqueness validator

1347 of 1384 relevant lines covered (97.33%)

8.68 hits per line

Source Files on job 286.1 (1.9.3)
  • Tree
  • List 0
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 286
  • Travis Job 286.1
  • 81819e6f on github
  • Prev Job for 1.9.3 on 3-2-stable (#282.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc