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

DavyJonesLocker / client_side_validations / 638
100%
main: 100%

Build:
Build:
LAST BUILD BRANCH: chore/remove-jquery
DEFAULT BRANCH: main
Ran 07 Mar 2017 12:06PM UTC
Jobs 3
Files 27
Run time 29s
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

pending completion
638

Pull #697

travis-ci

web-flow
Validate Rails nested attributes

Consider the following example:

  class User < ActiveRecord::Base
    has_many :phone_numbers
    accepts_nested_attributes_for :phone_numbers
  end

  class PhoneNumber < ActiveRecord::Base
    # This is a bit contrived, because probably it should be
    # many-to-many
    has_many :labels
    accepts_nested_attributes_for :labels
  end

  class Label < ActiveRecord::Base
    belongs_to :phone_number
  end

If you render this on 1 page to edit labels you end up with the
following attributes name

  user[phone_numbers_attributes][0][labels_attributes][0][label]

And validation is on field
  user[phone_numbers_attributes][][label_attributes][][label]

At the moment the most current version of client side validation only
supports 1 level of nesting of accepts_nested_attributes_for. This
commit makes it support any level of nesting.
Pull Request #697: Deeply nested attributes

443 of 443 relevant lines covered (100.0%)

67.4 hits per line

Jobs
ID Job ID Ran Files Coverage
1 638.1 (2.2.6, gemfiles/rails_5.0.gemfile) 07 Mar 2017 12:06PM UTC 0
100.0
Travis Job 638.1
2 638.2 (2.3.3, gemfiles/rails_5.0.gemfile) 07 Mar 2017 12:07PM UTC 0
100.0
Travis Job 638.2
3 638.3 (2.4.0, gemfiles/rails_5.0.gemfile) 07 Mar 2017 12:06PM UTC 0
100.0
Travis Job 638.3
Source Files on build 638
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #638
  • Pull Request #697
  • PR Base - master (#636)
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