
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
rails_engine_decorators
Advanced tools
= Rails Engine Decorators
Extend Rails Engine's business logic (models, controllers, helpers, etc.) easily from your application or other engine.
This solution was first implemented in the Forem engine, see https://github.com/radar/forem/pull/260
== Authors
== Usage
(From Forem's patch):
Standard practice for including such changes in your application or extension is to create a file within the relevant app/models or app/controllers directory with the original class name with _decorator appended.
# app/decorators/models/forem/post_decorator.rb
Forem::Post.class_eval do
def some_method
...
end
end
# app/decorators/controllers/forem/posts_controller_decorator.rb
Forem::PostsController.class_eval do
def some_action
...
end
end
The exact same format can be used to redefine an existing method.
FAQs
Unknown package
We found that rails_engine_decorators demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.