Coder Social home page Coder Social logo

Comments (5)

smadeja avatar smadeja commented on May 16, 2024 2

You can comment it out using this trick:

<body>
  <%= yield %>

  <!-- fake tag to fool Rack::Tracker
    </body>
  -->
</body>

Rack::Tracker will find the fake </body> tag and insert its stuff inside the comment. ;-)

from rack-tracker.

holden avatar holden commented on May 16, 2024 1

We're having the same issue on our Google AMP pages, we trying to skip rendering on certain controllers or layouts entirely as JS is not allowed. Not sure how to best accomplish this?

We had the same problem with NewRelic but they provide a way to ignore specific actions.

https://docs.newrelic.com/docs/agents/ruby-agent/customization/ignoring-specific-transactions

from rack-tracker.

DonSchado avatar DonSchado commented on May 16, 2024

you could "configure" this in a proc by checking the env["PATH_INFO"] for your views url.
sorry, this feature is a little bit hidden in the documentation...

You can find an example here: #34 (comment)

from rack-tracker.

bumi avatar bumi commented on May 16, 2024

does @DonSchado's solution work for you?
If so this might be something that should be documented in the readme?

from rack-tracker.

luizeof avatar luizeof commented on May 16, 2024

You can comment it out using this trick:

<body>
  <%= yield %>

  <!-- fake tag to fool Rack::Tracker
    </body>
  -->
</body>

Rack::Tracker will find the fake </body> tag and insert its stuff inside the comment. ;-)

it works! Thanks

from rack-tracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.