Class: BootstrapViewHelpersController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/bootstrap_view_helpers_controller.rb

Overview

This controller displays working examples of the helpers.

After installation, restart your rails server and point your browser to:

http://<app_name>/bootstrap_view_helpers

Instance Method Summary collapse

Instance Method Details

#flash_helperObject



13
14
15
16
17
18
19
20
# File 'app/controllers/bootstrap_view_helpers_controller.rb', line 13

def flash_helper
  flash.now[:notice] = ":notice is mapped to :info"
  flash.now[:alert] = ":alert is mapped to :error"
  flash.now[:warning] = 'Unrecognized types use Bootstrap default'
  flash.now[:success] = "The operation was a success"
  flash.now[:error] = "There was an error"
  flash.now[:info] = "Here is some info"
end

#indexObject



10
11
# File 'app/controllers/bootstrap_view_helpers_controller.rb', line 10

def index
end