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

shakacode / react_on_rails / 512
0%

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

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

3 of 3 new or added lines in 1 file covered. (100.0%)

326 of 374 relevant lines covered (87.17%)

19.02 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
app/helpers/react_on_rails_helper.rb
Jobs
ID Job ID Ran Files Coverage
1 512.1 (2.2.3, export RAILS_ENV=test, spec/dummy/Gemfile) 17 Nov 2015 07:18AM UTC 0
87.17
Travis Job 512.1
Source Files on build 512
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #512
  • Pull Request #102
  • PR Base - master (#510)
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