aboutsummaryrefslogtreecommitdiffstats
path: root/app/inputs/boolean_input.rb
diff options
context:
space:
mode:
authorLuc Donnet2015-05-21 17:32:51 +0200
committerLuc Donnet2015-05-21 17:32:51 +0200
commit12f0d822d218b43fada191a9390a80aa77742ebe (patch)
tree89e811e719b67c1a7d22c5d85556f6d4526b3e52 /app/inputs/boolean_input.rb
parent941081de920c6775e3ea0a254bb37cfe54077aec (diff)
parent8dc301b503ae261c788f6d0109ed54fc3b71dc58 (diff)
downloadchouette-core-12f0d822d218b43fada191a9390a80aa77742ebe.tar.bz2
Merge branch 'rails4' of github.com:afimb/chouette2 into rails4
Diffstat (limited to 'app/inputs/boolean_input.rb')
-rw-r--r--app/inputs/boolean_input.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/inputs/boolean_input.rb b/app/inputs/boolean_input.rb
new file mode 100644
index 000000000..a2b9b92ca
--- /dev/null
+++ b/app/inputs/boolean_input.rb
@@ -0,0 +1,9 @@
+class BooleanInput < Formtastic::Inputs::BooleanInput
+ def label_with_nested_checkbox
+ builder.label(
+ method,
+ label_text,
+ label_html_options.merge(class: "label")
+ ) << "" << check_box_html
+ end
+end