4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/redmine-installer/helpers/generate_config.rb', line 4
def create_for(type)
choices = {}
type.all.each do |m|
choices[m] = m.title
end
choices[nil] = t(:skip)
answer = choose(nil, choices, default: nil)
return false if answer.nil?
instance = answer.new
say("(#{instance.class.title})", 2)
instance.params.for_asking.each do |p|
p.value = ask(p.title, default: p.default, hide: p.hide)
end
instance.make_config(base.tmp_redmine_root)
return true
end
|