lib/datagrid/columns.rb
# Returns a list of columns defined.
# You can limit the output with only columns you need like:
#
#   grid.columns(:id, :name)
#
# Supported options:
# * :data - if true returns only non-html columns. Default: false.
Returns a list of columns defined.
You can limit the output with only columns you need like.



Supported options:
:data - if true returns only non-html columns. Default: false.
Returns a list of columns defined . You can limit the output with only columns you need like . Supported options : : data - if true returns only non - html columns . Default : false .
def columns(*args)
        options = args.extract_options!
        args.compact!
        args.map!(&:to_sym)
        columns_array.select do |column|
          (!options[:data] || column.data?) && (args.empty? || args.include?(column.name))
        end
      end
def columns ( * args ) options = args . extract_options! args . compact! args . map! ( & :to_sym ) columns_array . select do | column | ( ! options [ :data ] || column . data? ) && ( args . empty? || args . include? ( column . name ) ) end end
Returns a list of columns defined.
Returns a list of columns defined .
args
<not_specific>