Method: Liquid::StandardFilters#first
- Defined in:
- lib/liquid/standardfilters.rb
#first(array) ⇒ Object
Get the first element of the passed in array
Example:
{{ product.images | first | to_img }}
95 96 97 |
# File 'lib/liquid/standardfilters.rb', line 95 def first(array) array.first if array.respond_to?(:first) end |