Method: Bootstrap::CommonHelper#arrayify_and_stringify_elements
- Defined in:
- app/helpers/bootstrap/common_helper.rb
#arrayify_and_stringify_elements(arg) ⇒ Array of String
Returns a new Array of String from arg.
31 32 33 34 35 36 37 38 39 |
# File 'app/helpers/bootstrap/common_helper.rb', line 31 def arrayify_and_stringify_elements(arg) return false if arg == false case when arg.blank? then [] when arg.is_a?(Array) then arg else arg.to_s.strip.split(/\s/) end.map(&:to_s) end |