Module: PageHelper
- Defined in:
- app/helpers/page_helper.rb
Instance Method Summary collapse
Instance Method Details
#check_all_button(param, label) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/page_helper.rb', line 2 def ( param, label ) html = <<-EOF <button type="button" id="check_all_#{ param }">#{ label }</button> <script> $(function(){ $("#check_all_#{ param }").click(function(e){ var checkboxes = $("input##{ param }"); checkboxes.prop("checked", !checkboxes.prop("checked")); }); }); </script> EOF html.html_safe end |