Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
It is very easy to enable lazy loading of partial with scroll in views.
You only use step_render
method instead of render
method.
Likewise, you can lazy load a fragment cache.
Add this line to your application's Gemfile:
gem 'step_render'
And then execute:
$ bundle
This plugin depends on lazysizes.
If you do not import lazysizes to your application, load import_step_render
method in required view.
application.html.erb
<head>
~~~
~~~
<%= import_step_render %>
~~~
</head>
Add the following line to the routes.rb
.
routes.rb
Rails.application.routes.draw do
~~~
mount_step_render
~~~
step_render
method instead of render
methodReplace render
helper method used to rendering the partial with step_render
.
Partial must be specified as an absolute path.
app/views/top/index.html.erb
<%= step_render 'top/partial_name' %>
step_cache
method instead of cache
methodReplace cache
helper method used to fragment cache with step_render
.
app/views/top/index.html.erb
<%= step_cache 'cache_key', skip_digest: true, expires_in: 24.hours %>
~~~
~~~html tags
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that step_render demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.