Forum: Ruby on Rails Passing args to generator

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ferenc-Lorant K. (Guest)
on 2009-02-03 12:41
I have some default_options in generator and when I wish to change they
value with --option_name I get only logical true instead of string
default_options :option_name => "Some string"
def add_options!(opt)
  opt.separator ''
  opt.separator 'Options:'
  opt.on("--option_name","Some Text") { |v| options[:option_name] = v }
Ferenc-Lorant K. (Guest)
on 2009-02-03 15:22
  Generating list,edit,save and show partials for tasks from TrstSysTask
table, based on 'exe_id' value.
  base_path /app/views/trst_sys (change with --controller_path)
  partial_path base_path/xxx/yyy/zzz/_*.html.erb with "./script/generate
task_partial xxx_yyy_zzz"
  or partial_path base_path/xxx/yyy/_zzz.html.erb with
"./script/generate task_partial xxx_yyy_zzz --single"
  "./script/generate task_partial db_sys_menu" =>
    /app/views/trst_sys/db/sys/menu/_list.html.erb, _edit.html.rb ....
  "./script/generate task_partial db_sys_menu --single" =>
  "./script/generate task_partial db_sys_menu --single --controller_path
"other_path"" =>

That's what I need.
But as I mentioned above using --controller_path always returns logical


This topic is locked and can not be replied to.