
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
ActsAsLearnable is a Ruby gem for ActiveRecord models. It provides a simple way to create flashcards in your app. It automatically schedules flashcards for review depending on recall quality (1 to 5). You can easily create a Spaced Repetition System (SRS) using this gem. Flashcards are scheduled using SuperMemo 2 algorithm.
Add this line to your application's Gemfile:
gem 'acts_as_learnable'
And then execute:
$ bundle
Or install it yourself as:
$ gem install acts_as_learnable
Create and run migrations (will add flashcard fields if table already exists):
$ rails generate flashcard MODEL
$ rake db:migrate
Within your model call acts_as_learnable
method:
class Flashcard < ActiveRecord::Base
acts_as_learnable
end
It will automatically extend your class with all necessary methods.
Then you can review flashcards:
card = Flashcard.create
card.review(4) # => Recall quality from 1 (bad) to 5 (perfect)
card.due_today? # => false
card.due # => 2015-03-11
card.studied_at # => 2015-03-10
card.interval # => 1
card.repetitions # => 1
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that acts_as_learnable 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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.