
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
In this world there are the has, and the has nots. ActiveRecord can has_many
other ActiveRecords, but what about the rest of us? SilverSpoon lets ActiveRecord objects has_many
Non-ActiveRecord objects, or for Non-ActiveRecord objects to has_many
other Non-ActiveRecord objects.
For the people!
class BankAccount
class << self
def find(args)
HTTP Request...
an arbitrary service...
or some awful local Modeling logic...
...
end
end
end
class User < ActiveRecord::Base
extend SilverSpoon::ActiveConcern
has_many :bank_accounts
end
user = User.new
user.bank_accounts
The referencing class does not have to be an ActiveRecord object. It simply needs to respond to a find
method as you would expect. Having an @id
or to_params
would be useful as well in most cases. It would also be nice if there was a save
method, if you're going to be doing something like that.
The find
method may receive the id from the referring object to associate the two.
FAQs
Unknown package
We found that meek 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.