Class: Tabulatr::Renderer::Checkbox

Inherits:
Column
  • Object
show all
Includes:
ActionView::Helpers::FormTagHelper
Defined in:
lib/tabulatr/renderer/checkbox.rb

Overview

– Copyright © 2010-2014 Peter Horn & Florian Thomas, metaminded UG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++

Instance Method Summary collapse

Methods inherited from Column

#action?, #association?, #determine_appropriate_filter!, from, #klassname, #principal_value, #sort_param, #to_json

Instance Method Details

#checkbox?Boolean

Returns:

  • (Boolean)


33
# File 'lib/tabulatr/renderer/checkbox.rb', line 33

def checkbox?() true end

#coltypeObject



31
# File 'lib/tabulatr/renderer/checkbox.rb', line 31

def coltype() 'checkbox' end

#column?Boolean

Returns:

  • (Boolean)


32
# File 'lib/tabulatr/renderer/checkbox.rb', line 32

def column?() false end

#full_nameObject



34
# File 'lib/tabulatr/renderer/checkbox.rb', line 34

def full_name() 'checkbox' end

#human_nameObject



27
28
29
# File 'lib/tabulatr/renderer/checkbox.rb', line 27

def human_name
  check_box_tag('mark_all', '1', false, class: 'tabulatr_mark_all').html_safe
end

#value_for(record, view) ⇒ Object



35
36
37
# File 'lib/tabulatr/renderer/checkbox.rb', line 35

def value_for(record, view)
  nil
end