Skip to content
Snippets Groups Projects

add minimum, maximum and step to integer and float questions, to make sliders possible

Merged Henk van der Veen requested to merge hh_slider_attrs into main
All threads resolved!
2 files
+ 18
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -5,6 +5,15 @@ module Quby
module Entities
module Questions
class FloatQuestion < Question
def as_json(options = {})
super.merge(
minimum: minimum,
maximum: maximum,
step: 0.01, # fixed in v1.
# defaultPosition: default_position # Needs discussion, can be number or string "hidden"
)
end
def size
@size || 30
end
Loading