New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

i_flash

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i_flash

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= IFlash

Rails Flash Internationalization Plugin.

Easily sets flash messages in your controllers, reading from locale.yml files.

== Install

gem install i_flash

== Usage

=== In your controller:

i_flash :success i_flash :failure i_flash_auto :success i_flash_auto :failure i_flash_for some_condition?

=== In your locale file (en.yml)

en: actions: controller_name: action_name: success: "Action is successful!" failure: "Action failed!"

=== In your view (or layout)

= notice = alert

== Example

=== /app/controllers/posts_controller.rb:

def destroy @post = Post.where(params[:id]).first i_flash_for @post.delete redirect_to :back end

=== /config/locales/en.yml:

en: actions: posts: destroy: success: "Post is deleted." failure: "Couldn't delete post."

= Copyright

Copyright (c) 2010 [vladalive.com], released under the MIT license

FAQs

Package last updated on 08 Nov 2010

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc