
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
A quick and simple way of using vanillicons in your next project.
gem install 'vanillicons'
If you are using this in a Rails project, or a project using Bundler then add the following to your Gemfile
gem 'vanillicons', '0.1.0'
In your model or class include the Vanillicons module
class User < ActiveRecord::Base
include Vanillicons
end
And thats all it takes to get started, in your views you can now use the #vanillicon_url
method.
<%= image_tag @user.vanillicon_url %>
By default the gem will call a method #email
on the object and hash that value. However you can change this to use any other field in the class, to change it you can do the following.
class User < ActiveRecord::Base
include Vanillicons
vanillicon :name
end
The gem will now call the #name
accessor to generate the image url.
There are a couple of options that can be passed to the #vanillicon_url
method. The defaults are the following.
{
:size => 200, # Options are: 50, 100, 200
:secure => true
}
This sets the image size to 200px by 200px and to use https connection.
You may override this when calling the #vanillicon_url
method.
<%= image_tag @user.vanillicon_url(:size => 50, :secure => false) %>
Or in the class if you frequently use a particular set of options.
class User < ActiveRecord::Base
include Vanillicons
vanillicon :email, :size => 100
end
Copyright (c) 2012 Gary Mardell. See LICENSE.txt for further details.
FAQs
Unknown package
We found that vanillicons 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
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.