|
|
|
@ -9,11 +9,11 @@ module Spike |
|
|
|
section.subsections.each do |subsection| |
|
|
|
section.subsections.each do |subsection| |
|
|
|
subsection.pages.each do |page| |
|
|
|
subsection.pages.each do |page| |
|
|
|
page.questions.each do |question| |
|
|
|
page.questions.each do |question| |
|
|
|
# create_question(question) |
|
|
|
create_question(question) |
|
|
|
end |
|
|
|
end |
|
|
|
# create_page(page) |
|
|
|
create_page(page) |
|
|
|
end |
|
|
|
end |
|
|
|
# create_subsection(subsection) |
|
|
|
create_subsection(subsection) |
|
|
|
end |
|
|
|
end |
|
|
|
create_section(section) |
|
|
|
create_section(section) |
|
|
|
end |
|
|
|
end |
|
|
|
@ -25,13 +25,13 @@ module Spike |
|
|
|
out_file.puts("class Form::Lettings::Sections::#{section.id.camelize} < ::Form::Section |
|
|
|
out_file.puts("class Form::Lettings::Sections::#{section.id.camelize} < ::Form::Section |
|
|
|
def initialize(id, hsh, form) |
|
|
|
def initialize(id, hsh, form) |
|
|
|
super |
|
|
|
super |
|
|
|
@id = \"#{section.id}\" |
|
|
|
@id = \"#{section.id}\"") |
|
|
|
@label = \"#{section.id}\" |
|
|
|
out_file.puts(" @label = \"#{section.id}\"") if section.id |
|
|
|
@description = \"#{section.description}\" |
|
|
|
out_file.puts(" @description = \"#{section.description}\"") if section.description |
|
|
|
@form = form |
|
|
|
out_file.puts(" @form = form |
|
|
|
@subsections = #{subsections_array} |
|
|
|
@subsections = #{subsections_array} |
|
|
|
end |
|
|
|
end |
|
|
|
end") |
|
|
|
end") |
|
|
|
out_file.close |
|
|
|
out_file.close |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|