Forum: Ruby on Rails Passing args to generator

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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 }
end
...
Ferenc-Lorant K. (Guest)
on 2009-02-03 15:22
Description:
  Generating list,edit,save and show partials for tasks from TrstSysTask
table, based on 'exe_id' value.
Convention:
  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"
Example:
  "./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" =>
    /app/views/trst_sys/db/sys/_menu.html.erb
  "./script/generate task_partial db_sys_menu --single --controller_path
"other_path"" =>
    /app/views/other_path/db/sys/_menu.html.erb

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

 /app/views/...true.../db/sys/_menu.html.erb

Arghhh
This topic is locked and can not be replied to.