
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.
{}[http://travis-ci.org/rubiety/message_block]
{
}[https://gemnasium.com/rubiety/message_block]
{
}[https://codeclimate.com/github/rubiety/message_block]
= Message Block
Implements the common view pattern by which a list of messages are shown at the top,
often a combination of flash messages and ActiveRecord validation issues on one or more models.
This allows for a nice, stylized block of messages at the top of the page with icons
indicating what type of message it is (error, confirmation, warning, etc.)
This view helper acts as a replacement for error_messages_for by taking error messages from your models and combing them with flash messages (multiple types such as error, confirm, etc.) and outputting them to your view. This gem comes with an example stylesheet and images.
== Installation: Rails 3.1+ Asset Pipeline (message_block 2.0)
Include the gem using bundler in your Gemfile:
gem "message_block", "~> 2.0"
Include the stylesheet in your application.css:
/* *= require message_block */
== Installation: Rails 3.0 Without Asset Pipeline (message_block 1.1)
Include the gem using bundler in your Gemfile:
gem "message_block", "~> 1.1"
Then run the rake task to install the static files:
rake message_block:install
Then be sure to include the CSS definitions:
<%= stylesheet_include_tag "message_block" %>
== Usage
Once you install this, you should now have a set of images at public/images/message_block and a basic stylesheet installed at public/stylesheets/message_block.css. Then you can use the helper <%= message_block %>:
The first argument specifies a hash options:
=== Example
Imagine you have a form for entering a user and a comment:
<%= message_block :on => [:user, :comment] %>
Imagine also you set these flash variables in the controller: class CommentsController def create flash.now[:error] = "Error A" flash.now[:confirm] = "Confirmation A" # Note you can use different types flash.now[:warn] = ["Warn A", "Warn B"] # Can set to an array for multiple messages end end
And let's say that you want to show these messages but also show the validation issues given that both user and comment fail ActiveRecord validation:
Note that instead of manually specifying models you wish to report errors on, you can instead use the special :all value which will automatically use all view assign values that contain an ActiveModel::Errors "errors" method.
== Running Tests
This gem uses appraisal to test with different versions of the dependencies. See Appraisal first for which versions are tested, then run to test all appraisals:
$ rake appraisal test
FAQs
Unknown package
We found that message_block 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.