Module: ThecoreHelper

Defined in:
app/helpers/thecore_helper.rb

Instance Method Summary collapse

Instance Method Details

#bootstrap_class_for(flash_type) ⇒ Object



2
3
4
# File 'app/helpers/thecore_helper.rb', line 2

def bootstrap_class_for(flash_type)
    { success: "alert-success", error: "alert-error", alert: "alert-danger", notice: "alert-info" }[flash_type.to_sym] || flash_type.to_s
end

#line_break(s) ⇒ Object



6
7
8
# File 'app/helpers/thecore_helper.rb', line 6

def line_break s
    s.gsub("\n", "<br/>")
end