
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.
= Avatars For Rails
Avatars For Rails is a integral solution to provide a model with avatar support.
It includes a database migration and views with jquery.fileupload and jquery.jcrop
It relies on paperclip and imagemagick
= Installation
Add to your Gemfile:
gem 'avatars_for_rails'
and run:
bundle update
Then, if you have a class named actor and you want it to have avatars, run:
rails generate avatars_for_rails:install user
This will generate the following:
Do not forget to migrate your database
rake db:migrate
In your model, you must include:
class User < ActiveRecord::Base acts_as_avatarable end
For rendering the new avatar form: <%= render partial: 'avatars/form', object: @user, as: :avatarable %>
You must include the javascript and css files
//= require avatars_for_rails
If you want to get an actor's avatar you can do: user.logo
For rendering an image_tag for an user's avatar: <%= image_tag(user.logo.url(:style) ) %>
FAQs
Unknown package
We found that avatars_for_rails demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
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.