Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strappy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strappy

  • 0.0.02
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Strappy

Strappy is in its very beginning stages. It is intended to be a collection of bootstrap helpers for Rails 4. The current version only includes a "Flash Messages" helper for displaying flash messages.

Installation

Clone the repo, git clone git://github.com/tommyschaefer/strappy.git, or download the current version.

You can include this in your rails project by adding gem "strappy" to your Gemfile. After running bundle install, you will have access to Strappy's helpers and rails g strap:install will generate Bootstrap's files for you.

Usage

Flash Messages

Flash messages can be created in two ways in your controller.

Using the string method, you declare flash messages like so: flash[:success] = "Message here". To make this a dismissable alert, you simply use the following form: flash[:success] = "[x] Message Here".

Using the hash method, you declare your message in the form: flash[:success] = { msg: "Message" }. A dismissible alert in this notation would look like: flash[:success] = { msg: "Message", dismissible: true }. Not that if you want a non-dismissable alert, you do not have to include the 'dismissable' attribute (although you can).

Alert types include "danger", "info", "warning", and "success." You can see what they look like respectively on the Twitter Bootstrap website.

In your view, you can render flash messages by including <%= flash_messages %>

FAQs

Package last updated on 03 Dec 2013

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