I have many pages to generate quickly. They are based off of the scaffold generator, but I want to convert the rhtml files to Markaby, and change some formatting. Without having to do a lot of repetitive hand editing. Is there a simple way to overwrite/extend part of the scaffold generator? Do I need to write my own from scratch? -- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060719/0faf5899/attachment.html
Larry Kelly wrote:> I have many pages to generate quickly. They are based off of the > scaffold > generator, but I want to convert the rhtml files to Markaby, and change > some > formatting. Without having to do a lot of repetitive hand editing. Is > there > a simple way to overwrite/extend part of the scaffold generator? Do I > need > to write my own from scratch?I''m not quite sure about what you need here and not sure what Markaby is but if it''s on a linux box and all you need is to rename the files (don''t know if you can change the contents of the file) from .rhtml to .mab, a Linux command on renaming is: mv *.rhtml *.mab And all of your files will be get renamed to the following extension. hope that was helpful Bing -- Posted via http://www.ruby-forum.com/.
Larry Kelly
2006-Jul-19 12:22 UTC
[Rails] Re: How do I overwrite/extend a scaffold module?
Thanks for the reply. What I was trying to say was that I needed to re-write parts of the default scaffold generated code. For instance, adding css class names to the labels on the forms. Converting the default _form.rhtml to a more CSS friendly fieldset layout. Overwrite was a bad choice of words. I think the OO term is ''overloading''. Where you change the behavior of a method by creating a new one with the same name. -Larry On 7/19/06, Bing Tan <sombreroisland@gmail.com> wrote:> > Larry Kelly wrote: > > I have many pages to generate quickly. They are based off of the > > scaffold > > generator, but I want to convert the rhtml files to Markaby, and change > > some > > formatting. Without having to do a lot of repetitive hand editing. Is > > there > > a simple way to overwrite/extend part of the scaffold generator? Do I > > need > > to write my own from scratch? > > I''m not quite sure about what you need here and not sure what Markaby is > but if it''s on a linux box and all you need is to rename the files > (don''t know if you can change the contents of the file) from .rhtml to > .mab, a Linux command on renaming is: > > mv *.rhtml *.mab > > And all of your files will be get renamed to the following extension. > > hope that was helpful > > Bing > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060719/534245b3/attachment.html
Larry Kelly wrote:> Thanks for the reply. What I was trying to say was that I needed to > re-write parts of the default scaffold generated code. For instance, > adding > css class names to the labels on the forms. Converting the default > _form.rhtml to a more CSS friendly fieldset layout. Overwrite was a > bad > choice of words. I think the OO term is ''overloading''. Where you change > the > behavior of a method by creating a new one with the same name. > -LarryI think that''s a real good question, because in the default rendering are alway things missing ... and sometime real basic stuff. I tried out ruby-on-rails and wondered that the date an time formats are shown nice with lists, but enumeration an sets not. A enumeration in mysql should generate radio-button or a list, a set check-boxes for example and not a plain input field. For me is the question ... 1) where can submit some kind of feature requests and 2) how could I overload (=adding features, not rewrite all by myself) the default scaffolding. Chris. -- Posted via http://www.ruby-forum.com/.
Larry Kelly
2006-Jul-20 14:16 UTC
[Rails] Re: Re: How do I overwrite/extend a scaffold module?
Is it possible to override the scaffold output for the ''_form.rhtml'' file? if not, should I be looking at creatin a generator or a plugin to build my own custom replacement? -Larry On 7/19/06, Chris <titusx@gmx.de> wrote:> > Larry Kelly wrote: > > Thanks for the reply. What I was trying to say was that I needed to > > re-write parts of the default scaffold generated code. For instance, > > adding > > css class names to the labels on the forms. Converting the default > > _form.rhtml to a more CSS friendly fieldset layout. Overwrite was a > > bad > > choice of words. I think the OO term is ''overloading''. Where you change > > the > > behavior of a method by creating a new one with the same name. > > -Larry > > I think that''s a real good question, because in the default rendering > are alway things missing ... and sometime real basic stuff. I tried out > ruby-on-rails and wondered that the date an time formats are shown nice > with lists, but enumeration an sets not. A enumeration in mysql should > generate radio-button or a list, a set check-boxes for example and not a > plain input field. > > For me is the question ... > 1) where can submit some kind of feature requests and > 2) how could I overload (=adding features, not rewrite all by myself) > the default scaffolding. > > Chris. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060720/697b8cfa/attachment.html