Method: Fancygrid::Node#columns

Defined in:
lib/fancygrid/node.rb

#columns(*names) ⇒ Object

Creates and adds a column for each given parameter. The columns are marked to be not selectable and not searchable.



68
69
70
71
72
73
74
# File 'lib/fancygrid/node.rb', line 68

def columns(*names)
  options = names.extract_options!
  options[:searchable] = options.fetch(:searchable, false)
  options[:selectable] = options.fetch(:selectable, false)
  options[:value_proc] = Proc.new if block_given?
  names.flatten.map { |name| self.column(name, options) }
end