|
|
Choosing A Webhost: |
Re: [Nitro] Generating scaffolding / stub codes?: msg#00317lang.ruby.nitro.general
On 2/21/06, James Britt <james_b@xxxxxxxxxxxxx> wrote: S P Arif Sahari Wibowo wrote: Sadly, that's not exactly true. It also in theory understands gen form. Unfortunately, it appears to have shipped broken in 0.28.0. And doesn't appear to be documented in the usage either. If you are interested in using it, it's a simple fix. From the ruby installation directory, Edit lib/ruby/gems/1.8/gems/gen-0.28.0/lib/gen/form/gen.rb Search for Nitro::FormMixin and change it to Nitro::FormHelper. Sample command line is: $ gen form file_containing_model_to_scaffold Optional_class_name_here optional_file_to_output_to or $ gen form models/user.rb User _user.xhtml It's outputs the xhtml form that would represent the object and can probably be called via render in your pages. It doesn't generate whole pages for you. On the other hand, I wrote my own controller stub generator with very If you're interested in submitting them, please just email them here. :) It's not exactly a formal process, but it could be a nice way to pioneer things. Or if you'd rather not, could you describe a few things that you've automated in addition to controllers? I'd really like a way for me to bundle up my custom generators as a gem, Re: gems; Looking at the gen script, it seems that if you follow the directory structure gen/#{generator}/gen.rb, or to use your controller generator as an example, gen/controller/gen.rb # gen controller params_go_here would actually find it now thanks to how Rubygems works. Completely untested though. Of course you'd potentially have a lot of collisions if it caught on so some formal system would have to be worked out. I'd imagine that's why the Rails folk went with the plugin idea? _______________________________________________ Nitro-general mailing list Nitro-general@xxxxxxxxxxxxx http://rubyforge.org/mailman/listinfo/nitro-general
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [Nitro] Generating scaffolding / stub codes?, James Britt |
|---|---|
| Next by Date: | Re: [Nitro] Generating scaffolding / stub codes?, James Britt |
| Previous by Thread: | Re: [Nitro] Generating scaffolding / stub codes?, James Britt |
| Next by Thread: | Re: [Nitro] Generating scaffolding / stub codes?, James Britt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |