What is the best way to create frames in rails? thanks fp
On 8/4/05, mr <no137b-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> What is the best way to create frames in rails? > thanks > fp<frame> ? It''s really no different than any other framework. The main page would probably be an empty action (or cached html page) with frames pointing to other rails actions. -- rick techno-weenie.net
On 8/4/05, mr <no137b-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> What is the best way to create frames in rails? > thanks > fpWell, frames is an HTML construct. You would build a frame with Rails just like you build your HTML in the views/ in Rails. To exptrapolate a bit further, I''m going to guess you are interested in rendering different actions in your frames. In that case, look into render_component(). render_partial() might be of use as well.
Ming Ma
2005-Aug-04 15:24 UTC
Examples problems with the book: Agile Web Development with Rails
Hi, I am doing book examples while reading Agile Web Development with Rails. I am stuck at chapter 8 Task C: Cart Creation at page 82. I am always getting errors when add to cart or display to cart. The error is: NoMethodError in Store#add_to_cart WARNING: You have a nil object when you probably didn''t expect it! Odds are you want an instance of Array instead. Look in the callstack to see where you''re working with an object that could be nil. Investigate your methods and make sure the object is what you expect! /app/models/Cart.rb:21:in `add_product'' /app/controllers/store_controller.rb:16:in `add_to_cart'' script/server:49 I also downloaded the sample code from pragmatic programmer web site, but depot8 gets error as well, it is different one though: NoMethodError in Store#add_to_cart undefined method `<<'' for nil:NilClass /app/models/cart.rb:21:in `add_product'' D:/BookCode/rails-code/depot8/app/controllers/store_controller.rb:16:in `add_to_cart'' script/server:51 Has anyone successfully finished this task? Can anyone help me? Thanks. Ming
On 8/4/05, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 8/4/05, mr <no137b-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > > What is the best way to create frames in rails? > > thanks > > fp > > <frame> ?EEK! If your requirements will allow (browser support, etc.) You might want to try emulating frame behaviour with CSS 456bereastreet.com/lab/cssframes stunicholls.myby.co.uk/layouts/frame.html That works well when you just need an area to scroll for you. If you haven''t already, look at the AJAX helpers in Rails. That can update a section of a page for you, IMO rendering frames useless. -- Chris Martin Web Developer Open Source & Web Standards Advocate chriscodes.com
On 8/4/05, mr <no137b-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> What is the best way to create frames in rails? > thanks > fpFind a web designer who was in hibernation since 1994 -- Tobi snowdevil.ca - Snowboards that don''t suck typo.leetsoft.com - Open source weblog engine blog.leetsoft.com - Technical weblog
Tobias Luetke wrote:> On 8/4/05, mr <no137b-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > >> What is the best way to create frames in rails? >> thanks >> fp >> > > Find a web designer who was in hibernation since 1994 > >Or just locate the Rails guy that used the iframe in the rubyonrails.com sites... :)
> What is the best way to create frames in rails?just a heads up: frames tend to generate concurrent requests, and concurrent requests mean that modifying the session store can fail due to a race condition in the CGI::Session design (when rails is running in a multi-process environment such as fastcgi). see: tagifieds.com/permatags/josh/rails-session-race-condition Josh Whiting Tagifieds.com | tag-based community bulletin board tagifieds.com