WindowRails

Rails helper for easy to use modals via bootstrap.

Important note

As of the 1.0 release, window_rails has been re-implemented using bootstrap as the core.

Requirements

  • jQuery
  • Bootstrap

Installation

Add window_rails to your application Gemfile:

  gem 'window_rails'

and then update your application manifests:

// app/assets/javascripts/application.js
//= require window_rails
/*
* app/assets/stylesheets/application.css
*= require window_rails
*/

Basic usage

Show an alert

<%= open_alert_window('This is an alert!') %>

Close alert

<%= close_alert_window %>

Create a new window

<%= create_window(:name => 'my-window', :title => 'My Window!', :content => 'Some Content') %>

Close window

<%= close_window('my-window') %>

Infos

License

  • WindowRails is released under an MIT license