
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
= image_picker
A simple, customizable image browser.
== Installation
Install the gem directly:
sudo gem install pelargir-image_picker --source=http://gems.github.com
Or install the gem in your Rails project as a plugin:
script/plugin install git://github.com/pelargir/image_picker.git
Or clone the project:
git clone git://github.com/pelargir/image_picker.git
Then install the required image, JS, and CSS files into your Rails project:
rake image_picker:install
== Usage
First, add the picker to your view and pass it the name of the image being picked. This name is used to create a hidden field that stores the database ID of the image that gets picked:
<%= image_picker :avatar %>
Now tell your controller that you'll be picking images, and which ActiveRecord model you'll be using:
class SomeController < ActionController::Base image_picker :model => Image end
The ActiveRecord class must respond to three method calls:
thumbnail: the path to the image's thumbnail (e.g. /images/foo_small.gif) title: a friendly title for the image description: a description of the image (optional)
That's it! The picker will show up in your view and, once you've picked an image, its database ID will be set as the value of the hidden field "_id" where is the name you passed to the image_picker helper in your view. The hidden field can then be submitted via a form or referenced in JavaScript.
== Other Options
The controller helper accepts any arguments you can pass to an ActiveRecord finder. For example:
class SomeController < ActionController::Base image_picker :model => Image, :order => "created_at DESC" end
If the will_paginate plugin is installed, the image picker will use it automatically. You can pass pagination options to the controller helper as well. For example:
class SomeController < ActionController::Base image_picker :model => Image, :per_page => 6 end
== Resources
Repository: http://github.com/pelargir/image_picker/ Blog: http://matthewbass.com Author: Matthew Bass
Extraction work sponsored by Terralien
FAQs
Unknown package
We found that image_picker 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.