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

shakacode / react_on_rails / 512 / 1
0%
master: 0%

Build:
DEFAULT BRANCH: master
Ran 17 Nov 2015 07:18AM UTC
Files 14
Run time 4s
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

17 Nov 2015 07:11AM UTC coverage: 87.166% (-0.1%) from 87.268%
2.2.3, export RAILS_ENV=test, spec/dummy/Gemfile

Pull #102

travis-ci

ryanaip
Use data attrs when rendering react_component's

Client side rendering scripts do not get called when using the forward/back buttons with turbolinks, because turbolinks does not re-evaluate script tags when navigating through the history.

Instead of creating script tags throughout the page, instead use html elements with data attributes specifying each react component to be rendered, and iterate through all of those elements whenever the page loads.

This has the added benefit of removing global data variables from being set on the window object and simplifying the rendering code.

(Note that it will be possible to support turbolinks navigation with the still-on-master `data-turbolinks-eval=always` feature of turbolinks.  But this solution doesn't depend on that upgrade and is a bit cleaner anyway.)
Pull Request #102: Use data attrs when rendering react_components instead of script tags

326 of 374 relevant lines covered (87.17%)

19.02 hits per line

Source Files on job 512.1 (2.2.3, export RAILS_ENV=test, spec/dummy/Gemfile)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 512
  • Travis Job 512.1
  • fad630f2 on github
  • Prev Job for 2.2.3, export RAILS_ENV=test, spec/dummy/Gemfile on master (#510.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