i have a copy of the typo source on my desktop that i am going through just to get a better understanding of the rails framework and ruby itself. i''m fairly new to everything so it has proved to be very helpful and very inspiring. i''m stuck on a part though. i was trying to figure out how everything on the sidebar works. i found the components folder and started looking through that. i have a basic understanding, but i can''t find the "setting" method defined anywhere. that seems to be the main thing i don''t really understand how it works. also, i''ve been reading the agile web book and it talks about components as if they were''really recommended for use. what would be an alternative of doing something like this if you didn''t use components? -- Posted via http://www.ruby-forum.com/.
Components seem to be on their way out. Try partials instead. I think the new app tutorial in the 2nd Ed. of the Agile book uses partials. On 7/15/06, Josh Kieschnick <jjkiesch@gmail.com> wrote:> i have a copy of the typo source on my desktop that i am going through > just to get a better understanding of the rails framework and ruby > itself. i''m fairly new to everything so it has proved to be very helpful > and very inspiring. > > i''m stuck on a part though. i was trying to figure out how everything on > the sidebar works. i found the components folder and started looking > through that. i have a basic understanding, but i can''t find the > "setting" method defined anywhere. that seems to be the main thing i > don''t really understand how it works. > > also, i''ve been reading the agile web book and it talks about > components as if they were''really recommended for use. what would be an > alternative of doing something like this if you didn''t use components? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
for partials, is there a way to keep their code separate or is that just something that needs to be in the parent method. TJ Stankus wrote:> Components seem to be on their way out. Try partials instead. I think > the new app tutorial in the 2nd Ed. of the Agile book uses partials.-- Posted via http://www.ruby-forum.com/.
Keeping view code separated out and reusable by various other templates is pretty much the point of partials. I can''t do this topic justice like Dave Thomas can though. :) If you have the 2nd. Ed. of the Agile book, p. 119 of the PDF has a solid introductory discussion with examples. (BTW, I have nothing to do with the book. It''s just good, so I recommend it.) -TJ On 7/15/06, Josh Kieschnick <jjkiesch@gmail.com> wrote:> for partials, is there a way to keep their code separate or is that just > something that needs to be in the parent method. > > TJ Stankus wrote: > > Components seem to be on their way out. Try partials instead. I think > > the new app tutorial in the 2nd Ed. of the Agile book uses partials. > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
thanks TJ. fortunately i do have the book. i will check it out. TJ Stankus wrote:> Keeping view code separated out and reusable by various other > templates is pretty much the point of partials. I can''t do this topic > justice like Dave Thomas can though. :) If you have the 2nd. Ed. of > the Agile book, p. 119 of the PDF has a solid introductory discussion > with examples. > > (BTW, I have nothing to do with the book. It''s just good, so I recommend > it.) > > -TJ-- Posted via http://www.ruby-forum.com/.