Hi. Is there a way, or has anyone written anything that would let me extract the HTML and Javascript code that Rails generates? I''m going to be applying for a front-end design position, and would like to be able to show some samples from my Rails work without having to run the apps. I can only get so much with View Source. I also love developing using helpers, RJS and HAML. It would be awesome to be able to use these tools, and output straight XHTML and Javascript for a non-Rails environment. Any thoughts? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bryan Mills wrote:> Hi. > > Is there a way, or has anyone written anything that would let me extract > the HTML and Javascript code that Rails generates? I''m going to be > applying for a front-end design position, and would like to be able to > show some samples from my Rails work without having to run the apps. I > can only get so much with View Source. > > I also love developing using helpers, RJS and HAML. It would be awesome > to be able to use these tools, and output straight XHTML and Javascript > for a non-Rails environment. > > Any thoughts?Turn on page caching for all your actions in all your controllers, and then go to all the pages in your browser. All your html would dumped to the public directory. However things like redirects after form submit would not work. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
aminox-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-17 03:08 UTC
Re: Extracting HTML/Javascript from Rails
WebDeveloper Toolbar for firefox has an option called view generated source. You can also view the generated JS with that tool. Another little neat tool is View Source Chart for Firefox which lets you see the generated DOM tree.> I also love developing using helpers, RJS and HAML. It would be awesome > to be able to use these tools, and output straight XHTML and Javascript > for a non-Rails environment.I can only think of XPath/XSLTs for this. On Feb 16, 7:42 pm, Bryan Mills <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi. > > Is there a way, or has anyone written anything that would let me extract > the HTML and Javascript code that Rails generates? I''m going to be > applying for a front-end design position, and would like to be able to > show some samples from my Rails work without having to run the apps. I > can only get so much with View Source. > > I also love developing using helpers, RJS and HAML. It would be awesome > to be able to use these tools, and output straight XHTML and Javascript > for a non-Rails environment. > > Any thoughts? > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
aminox-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> WebDeveloper Toolbar for firefox has an option called view generated > source. You can also view the generated JS with that tool. Another > little neat tool is View Source Chart for Firefox which lets you see > the generated DOM tree. > >> I also love developing using helpers, RJS and HAML. It would be awesome >> to be able to use these tools, and output straight XHTML and Javascript >> for a non-Rails environment. > > I can only think of XPath/XSLTs for this. > > > > On Feb 16, 7:42 pm, Bryan Mills <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>Thank you both! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Haml can actually be generated in a non-Rails environment. Just install the gem gem install haml and then include it require ''rubygems'' require ''haml'' haml_object = Haml::Engine.new("%haml") haml_object.render #returns the XHTML Hope this helps! -hampton. On Feb 17, 10:02 am, Bryan Mills <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> ami...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > WebDeveloper Toolbar for firefox has an option called view generated > > source. You can also view the generated JS with that tool. Another > > little neat tool is View Source Chart for Firefox which lets you see > > the generated DOM tree. > > >> I also love developing using helpers, RJS andHAML. It would be awesome > >> to be able to use these tools, and output straight XHTML and Javascript > >> for a non-Rails environment. > > > I can only think of XPath/XSLTs for this. > > > On Feb 16, 7:42 pm, Bryan Mills <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > Thank you both! > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---