Sha256: ebdf7474857cd946e5b24dec8828c2103e827f5eb2dc9688035b55e272394ec5
Contents?: true
Size: 1.2 KB
Versions: 6
Compression:
Stored size: 1.2 KB
Contents
%ul.ask.questions =f.fields_for(:questions) do |question| %li.question %dl .hidden.position-wrapper =question.hidden_field(:position) %dt.name=question.label(:name) %dd.name=question.text_field(:name, :placeholder=>'Title') %dt.instructions=question.label(:instructions) %dd.instructions=question.text_area(:instructions, :placeholder=>'Instructions') %dt.type=question.label(:type) %dd.type=question.collection_select(:type, Question::TYPES, :to_s, :titleize) %dt.required=question.label(:required) %dd.required=question.select(:required, [['Optional', false], ['Required', true]]) -unless question.object.new_record? %dt.delete=question.label(:_destroy, 'Delete') %dd.delete=question.check_box(:_destroy) %dt.choices %dd.choices %ul.choices =question.fields_for(:choices) do |choice| %li.choice =choice.label(:name) =choice.text_field(:name, :placeholder=>'Choice') -unless choice.object.new_record? =choice.label(:_destroy, 'Remove') =choice.check_box(:_destroy)
Version data entries
6 entries across 6 versions & 1 rubygems