I''d like to take some advice and write a generator to change the scaffold.css. How do I do that? I looked on the wiki and googled it but have not found anything yet. Any help would be much appreciated. bruce
On Jan 6, 2006, at 1:45 PM, Bruce Balmer wrote:> I''d like to take some advice and write a generator to change the > scaffold.css. How do I do that? I looked on the wiki and googled > it but have not found anything yet. > > Any help would be much appreciated. > > bruce > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Bruce- There isn''t a whole lot of documentation on how to write a generator that I have seen. You are better off dissecting one yourself. Here is a very simple one for you to play with that I wrote. Its just a lighttpd.conf file generator for either scgi or fcgi configuration generation. But it ought to show you how to build a basic generator so you can look at some more complex oones and see whats going on. Cheers- -Ezra Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra@yakima-herald.com
bruce balmer wrote:> I''d like to take some advice and write a generator to change the > scaffold.css. How do I do that? I looked on the wiki and googled it > but have not found anything yet. > > Any help would be much appreciated. > > bruceI would just reverse engineer the standard scaffold generator, there are probably big chunks of text in it that you can just replace. -- Posted via http://www.ruby-forum.com/.
On Jan 6, 2006, at 2:03 PM, Ezra Zygmuntowicz wrote:> > On Jan 6, 2006, at 1:45 PM, Bruce Balmer wrote: > >> I''d like to take some advice and write a generator to change the >> scaffold.css. How do I do that? I looked on the wiki and googled >> it but have not found anything yet. >> >> Any help would be much appreciated. >> >> bruce >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > Bruce- > > There isn''t a whole lot of documentation on how to write a > generator that I have seen. You are better off dissecting one > yourself. Here is a very simple one for you to play with that I > wrote. Its just a lighttpd.conf file generator for either scgi or > fcgi configuration generation. But it ought to show you how to > build a basic generator so you can look at some more complex oones > and see whats going on.Sorry forgot to paste the link: http://brainspl.at/files/lighttpd.tar.gz Cheers- -Ezra Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra@yakima-herald.com
Kevin: thanks, Happy to do that if I could ever find out where it is so I could look at the file. Also, I am using Locomotive. Not sure if that complicates things re finding these files. Do you know where the file lives? I tried which rails_generator and got nothing back. tia. bruce On 6-Jan-06, at 3:22 PM, Kevin Olbrich wrote:> bruce balmer wrote: >> I''d like to take some advice and write a generator to change the >> scaffold.css. How do I do that? I looked on the wiki and googled it >> but have not found anything yet. >> >> Any help would be much appreciated. >> >> bruce > > I would just reverse engineer the standard scaffold generator, > there are > probably big chunks of text in it that you can just replace. > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Ezra: thanks for sending that. I took a quick look at it. I would love to find some good documentation. I think that what may be obvious to you is not YET obvious to me. Maybe I could start with altering the template the generator uses and keep a copy somewhere so that I can put it back each time I upgrade rails. Where could I find that file. Two people have given me answers on its location but I can find nothing similar to the paths they give me. I am on OS X using Locomotive. (which I love, by the way) bruce On 6-Jan-06, at 3:23 PM, Ezra Zygmuntowicz wrote:> > On Jan 6, 2006, at 2:03 PM, Ezra Zygmuntowicz wrote: > >> >> On Jan 6, 2006, at 1:45 PM, Bruce Balmer wrote: >> >>> I''d like to take some advice and write a generator to change the >>> scaffold.css. How do I do that? I looked on the wiki and googled >>> it but have not found anything yet. >>> >>> Any help would be much appreciated. >>> >>> bruce >>> _______________________________________________ >>> Rails mailing list >>> Rails@lists.rubyonrails.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> >> Bruce- >> >> There isn''t a whole lot of documentation on how to write a >> generator that I have seen. You are better off dissecting one >> yourself. Here is a very simple one for you to play with that I >> wrote. Its just a lighttpd.conf file generator for either scgi or >> fcgi configuration generation. But it ought to show you how to >> build a basic generator so you can look at some more complex oones >> and see whats going on. > > > Sorry forgot to paste the link: > > http://brainspl.at/files/lighttpd.tar.gz > > Cheers- > -Ezra Zygmuntowicz > Yakima Herald-Republic > WebMaster > http://yakimaherald.com > 509-577-7732 > ezra@yakima-herald.com > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
http://wiki.rubyonrails.com/rails/pages/UnderstandingGenerators I used that page as a reference when writing my OpenIDLoginGenerator. Hope that helps, Brian Ellin http://openidenabled.com/openid/libraries/ruby On 1/6/06, Bruce Balmer <brucebalmer@mac.com> wrote:> > I''d like to take some advice and write a generator to change the > scaffold.css. How do I do that? I looked on the wiki and googled it > but have not found anything yet. > > Any help would be much appreciated. > > bruce > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060106/e4876d84/attachment.html
Bruce- I am attaching a copy of the scaffolding generator in its entirety from rails1.0 on osx. You can edit a copy to keep even through rails version upgrades by putting in a dir called ~/.rails/generators/ myscaffold . So you can take the one I am sending you and edit the templates and css however you like and then run script/generate myscaffold Foo Bar just like a normal scaffold to get your personalized version instead. When you use locomotive it has its own self contained gems and so if you want to find the rails generators in the locomotive bundle you will need to open your terminal shell from inside of locomotive becasue it changes you $PATH in order to keep itself contained. I don''t know offhand what the path to the generators are in locomotive. Hope that gets you going. Cheers- -Ezra -------------- next part -------------- A non-text attachment was scrubbed... Name: scaffold.tar.gz Type: application/x-gzip Size: 4797 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060107/f9214f78/scaffold.tar-0001.bin -------------- next part -------------- On Jan 6, 2006, at 2:59 PM, Bruce Balmer wrote:> Ezra: > > thanks for sending that. I took a quick look at it. I would love > to find some good documentation. I think that what may be obvious > to you is not YET obvious to me. Maybe I could start with altering > the template the generator uses and keep a copy somewhere so that I > can put it back each time I upgrade rails. > > Where could I find that file. Two people have given me answers on > its location but I can find nothing similar to the paths they give > me. I am on OS X using Locomotive. (which I love, by the way) > > bruce > > > On 6-Jan-06, at 3:23 PM, Ezra Zygmuntowicz wrote: > >> >> On Jan 6, 2006, at 2:03 PM, Ezra Zygmuntowicz wrote: >> >>> >>> On Jan 6, 2006, at 1:45 PM, Bruce Balmer wrote: >>> >>>> I''d like to take some advice and write a generator to change the >>>> scaffold.css. How do I do that? I looked on the wiki and >>>> googled it but have not found anything yet. >>>> >>>> Any help would be much appreciated. >>>> >>>> bruce >>>> _______________________________________________ >>>> Rails mailing list >>>> Rails@lists.rubyonrails.org >>>> http://lists.rubyonrails.org/mailman/listinfo/rails >>>> >>> >>> Bruce- >>> >>> There isn''t a whole lot of documentation on how to write a >>> generator that I have seen. You are better off dissecting one >>> yourself. Here is a very simple one for you to play with that I >>> wrote. Its just a lighttpd.conf file generator for either scgi or >>> fcgi configuration generation. But it ought to show you how to >>> build a basic generator so you can look at some more complex >>> oones and see whats going on. >> >> >> Sorry forgot to paste the link: >> >> http://brainspl.at/files/lighttpd.tar.gz >> >> Cheers- >> -Ezra Zygmuntowicz >> Yakima Herald-Republic >> WebMaster >> http://yakimaherald.com >> 509-577-7732 >> ezra@yakima-herald.com >> >> >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-Ezra Zygmuntowicz WebMaster Yakima Herald-Republic Newspaper ezra@yakima-herald.com 509-577-7732
Ezra: Thanks, very much. bruce On 6-Jan-06, at 6:04 PM, Ezra Zygmuntowicz wrote:> Bruce- > > I am attaching a copy of the scaffolding generator in its entirety > from rails1.0 on osx. You can edit a copy to keep even through > rails version upgrades by putting in a dir called ~/.rails/ > generators/myscaffold . So you can take the one I am sending you > and edit the templates and css however you like and then run script/ > generate myscaffold Foo Bar just like a normal scaffold to get your > personalized version instead. > > When you use locomotive it has its own self contained gems and so > if you want to find the rails generators in the locomotive bundle > you will need to open your terminal shell from inside of locomotive > becasue it changes you $PATH in order to keep itself contained. I > don''t know offhand what the path to the generators are in locomotive. > > Hope that gets you going. > > Cheers- > -Ezra > > <scaffold.tar.gz> > > On Jan 6, 2006, at 2:59 PM, Bruce Balmer wrote: > >> Ezra: >> >> thanks for sending that. I took a quick look at it. I would love >> to find some good documentation. I think that what may be obvious >> to you is not YET obvious to me. Maybe I could start with >> altering the template the generator uses and keep a copy somewhere >> so that I can put it back each time I upgrade rails. >> >> Where could I find that file. Two people have given me answers on >> its location but I can find nothing similar to the paths they give >> me. I am on OS X using Locomotive. (which I love, by the way) >> >> bruce >> >> >> On 6-Jan-06, at 3:23 PM, Ezra Zygmuntowicz wrote: >> >>> >>> On Jan 6, 2006, at 2:03 PM, Ezra Zygmuntowicz wrote: >>> >>>> >>>> On Jan 6, 2006, at 1:45 PM, Bruce Balmer wrote: >>>> >>>>> I''d like to take some advice and write a generator to change >>>>> the scaffold.css. How do I do that? I looked on the wiki and >>>>> googled it but have not found anything yet. >>>>> >>>>> Any help would be much appreciated. >>>>> >>>>> bruce >>>>> _______________________________________________ >>>>> Rails mailing list >>>>> Rails@lists.rubyonrails.org >>>>> http://lists.rubyonrails.org/mailman/listinfo/rails >>>>> >>>> >>>> Bruce- >>>> >>>> There isn''t a whole lot of documentation on how to write a >>>> generator that I have seen. You are better off dissecting one >>>> yourself. Here is a very simple one for you to play with that I >>>> wrote. Its just a lighttpd.conf file generator for either scgi >>>> or fcgi configuration generation. But it ought to show you how >>>> to build a basic generator so you can look at some more complex >>>> oones and see whats going on. >>> >>> >>> Sorry forgot to paste the link: >>> >>> http://brainspl.at/files/lighttpd.tar.gz >>> >>> Cheers- >>> -Ezra Zygmuntowicz >>> Yakima Herald-Republic >>> WebMaster >>> http://yakimaherald.com >>> 509-577-7732 >>> ezra@yakima-herald.com >>> >>> >>> >>> _______________________________________________ >>> Rails mailing list >>> Rails@lists.rubyonrails.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > -Ezra Zygmuntowicz > WebMaster > Yakima Herald-Republic Newspaper > ezra@yakima-herald.com > 509-577-7732 > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails