38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/selectable_attr_rails/helpers/check_box_group_helper.rb', line 38
def check_box_group(object_name, method, options = nil, &block)
object = (options || {})[:object] || instance_variable_get("@#{object_name}")
builder = Builder.new(object, object_name, method, options, self)
if block_given?
yield(builder)
return nil
else
result = ''
builder.each do
result << builder.check_box
result << ' '
result << builder.label
result << ' '
end
return result.respond_to?(:html_safe) ? result.html_safe : result
end
end
|