Hi, I have a really dumb qustion, but I can''t find an answer in "Agile Rails" or any other hand holder. And, it is a difficult topic to search for in google. What controller/view is used for the home page of a site? I get how to create new controllers, but I don''t get at all how to change content on the home page. thanks, matt On 12/14/05, Austin Ziegler <halostatue-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On 14/12/05, Jodi Showers <jodi-BOB1p6JRLoAV+D8aMU/kSg@public.gmane.org> wrote: > > Having read over the ruby pdf generation (simple reporting) options, I > > think Pdf::Writer will do just fine... > > > > ..if the following is possible > > > > On page 13 of (the really expansive) ::Writer manual, Replacement Tags > > are detailed. > > Replacement tags are simply ways to programmatically insert text or > other tags. I am using this in the manual code (PDF::TechBook) to > replace <r:xref> tags with internal link tags (<c:ilink>). That way, I > can just put something like: > > <r:xref name="EmbeddingFonts" label="title" /> > > which will be replaced with: > > <c:ilink dest=''tgEmbeddingFonts''>Embedding Fonts</c:ilink> > > It''s not really what you want for writing reports or injecting > ActiveRecord contents unless you''re entirely working with a template, > which isn''t really something that is built-in for PDF::Writer at this > point. > > Tags are specifically meant to replace text within PDF::Writer#text > calls, which is essentially what PDF::TechBook uses. It''s a callback, > not a general text insertion method. > > -austin > -- > Austin Ziegler * halostatue-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > * Alternate: austin-/yODNl0JVVCozMbzO90S/Q@public.gmane.org > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 15 Dec 2005, at 04:00, matthew clark wrote:> What controller/view is used for the home page of a site? I get > how to create new controllers, but I don''t get at all how to change > content on the home page.The one that you define in your config/routes.rb -- there''s a few comments in there which should give you a good idea about how to start. Yours, Craig -- Craig Webster | t: +44 (0)131 516 8595 | e: craig-07VhxHapISisTnJN9+BGXg@public.gmane.org Xeriom.NET | f: +44 (0)709 287 1902 | w: http://xeriom.net
On 12/14/05, Craig Webster <craig-07VhxHapISisTnJN9+BGXg@public.gmane.org> wrote:> On 15 Dec 2005, at 04:00, matthew clark wrote: > > What controller/view is used for the home page of a site? I get > > how to create new controllers, but I don''t get at all how to change > > content on the home page. > > The one that you define in your config/routes.rb -- there''s a few > comments in there which should give you a good idea about how to start.map.connect '''', :controller => "default_controller", :action => "default_action" That''s what controller and action will be used when the user goes to http://www.url.com/
The four days on rails tutorial has a good example of this. Simply add the following to your config/routes.rb file: map.connect '''', :controller => ''home'' Where ''home'' is the name of the controller that should handle your home page requests. HTH... Cheers, Mark On 12/14/05, Craig Webster <craig-07VhxHapISisTnJN9+BGXg@public.gmane.org> wrote:> On 15 Dec 2005, at 04:00, matthew clark wrote: > > What controller/view is used for the home page of a site? I get > > how to create new controllers, but I don''t get at all how to change > > content on the home page. > > The one that you define in your config/routes.rb -- there''s a few > comments in there which should give you a good idea about how to start. > > Yours, > Craig > -- > Craig Webster | t: +44 (0)131 516 8595 | e: craig-07VhxHapISisTnJN9+BGXg@public.gmane.org > Xeriom.NET | f: +44 (0)709 287 1902 | w: http://xeriom.net > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >