
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
decent_decoration allows you to use excellent decent_exposure 3.0 gem with decorators.
Add this line to your application's Gemfile:
gem 'decent_decoration', '~> 0.1.0'
And then execute:
$ bundle
# app/controllers/conferences_controller.rb
# with decent_exposure
class ConferencesController < ApplicationController
expose(:conference) { ConferenceDecorator.new(build_conference) }
private
def build_conference
# create new conference or fetch existing one
end
end
# with decent_decoration
class ConferencesController < ApplicationController
expose_decorated(:conference)
end
decent_decoration makes decorated objects accessible in views. They remain undecorated in your controllers.
Define a decorator explicitly:
# app/controllers/conferences_controller.rb
class ConferencesController < ApplicationController
expose_decorated(:conference, decorator: SponsoredConferenceDecorator)
end
decent_decoration detect automatically if you want to decorate a collection. To circumvent this pass collection: true/false
# app/controllers/conferences_controller.rb
class ConferencesController < ApplicationController
expose_decorated(:conferences, collection: false)
end
decent_decoration supports most of the awesome decent_exposure api. Read more about it!
# app/controllers/attendees_controller.rb
class AttendeesController < ApplicationController
expose_decorated(:conference)
expose_decorated(:attendees, scope: :conference)
end
You can use any decorator mechanism as long as ConferenceDecorator
responds to #decorate
or #new
. Try draper.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Copyright © 2012–2014 netguru. See LICENSE for further details.
FAQs
Unknown package
We found that decent_decoration 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.