It is not working:* layout ''uploadframe'', :except=>:new_music, :except=>:new_article *It work perfectily: * layout ''uploadframe'', :except=>:new_music * How I do many exeptions??? Thank you -- Pedro C. Valentini pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org +55 (21) 8708-8035
layout ''uploadframe'', :except=> [:new_music, :new_article] Don''t repeat yourself ;) Duane Johnson (canadaduane) On Apr 7, 2005 5:39 PM, Pedro Valentini <pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote:> > It is not working:* > layout ''uploadframe'', :except=>:new_music, :except=>:new_article > > *It work perfectily: > * layout ''uploadframe'', :except=>:new_music > * > How I do many exeptions??? > > Thank you > -- > > Pedro C. Valentini > pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org > +55 (21) 8708-8035 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Thank you, you save my life... But I stoped in other problem: When *new_music* submit to *create_music*, create_music don''t show the layout, show only the content... but it isen''t in exept list of the layout, *uploadframe* How show the layout *uploadframe* in *create_music???* layout ''uploadframe'', :except=> [:new_music, :new_article] And this controler have a def *create_music...* Pedro Duane Johnson escreveu:> layout ''uploadframe'', :except=> [:new_music, :new_article] > >Don''t repeat yourself ;) > >Duane Johnson >(canadaduane) > >
Try putting render_action "uploadframe" in your create_music method. It''s either that or some other "render_[something]" method. On Apr , 7 2005 2:44 PM, Pedro Valentini <pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote:> > Thank you, you save my life... > > But I stoped in other problem: > When *new_music* submit to *create_music*, create_music don''t show the > layout, show only the content... but it isen''t in exept list of the > layout, *uploadframe* > How show the layout *uploadframe* in *create_music???* > > layout ''uploadframe'', :except=> [:new_music, :new_article] > And this controler have a def *create_music...* > > Pedro > > Duane Johnson escreveu: > > > layout ''uploadframe'', :except=> [:new_music, :new_article] > > > >Don''t repeat yourself ;) > > > >Duane Johnson > >(canadaduane) > > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
I tryed, and the mesg is it: ActionView::ActionViewError in Media#create_article *No rhtml, rxml, or delegate template found for media/uploadframe* Because *uploadframe* is a layout and not a page/action...* * Shalev NessAiver escreveu:>Try putting > >render_action "uploadframe" > >in your create_music method. > >It''s either that or some other "render_[something]" method. > >On Apr , 7 2005 2:44 PM, Pedro Valentini <pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote: > > >>Thank you, you save my life... >> >>But I stoped in other problem: >>When *new_music* submit to *create_music*, create_music don''t show the >>layout, show only the content... but it isen''t in exept list of the >>layout, *uploadframe* >>How show the layout *uploadframe* in *create_music???* >> >>layout ''uploadframe'', :except=> [:new_music, :new_article] >>And this controler have a def *create_music...* >> >>Pedro >> >>Duane Johnson escreveu: >> >> >> >>> layout ''uploadframe'', :except=> [:new_music, :new_article] >>> >>>Don''t repeat yourself ;) >>> >>>Duane Johnson >>>(canadaduane) >>> >>> >>> >>> >>_______________________________________________ >>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 > > > > >-- Pedro C. Valentini pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org +55 (21) 8708-8035
Sorry, I can''t unfortunately solve your problem, but you should definitely *not* put render_action to render a layout. Layouts are rendered completely automatically and you only need to take action when you don''t want to use a layout for some action (given you have implemented a layout file in app/view/layouts). render_action is what you use to use to render a normal view file. If you have action "beep" in "TweetyController", that action will implicitly render_action "tweety/beep", so you don''t have to put it in your action. If you however want to use e.g. some common view file used also by other actions, you need to say render_action "tweety/common". That will override the default rendering and use app/views/tweety/common.rhtml instead. Hope this helps to clarify the rendering a bit. You could also post some code so we could take a look at why the layout file doesn''t get used. //jarkko On 8.4.2005, at 02:09, Pedro Valentini wrote:> I tryed, and the mesg is it: > > > ActionView::ActionViewError in Media#create_article > > *No rhtml, rxml, or delegate template found for media/uploadframe* > > Because *uploadframe* is a layout and not a page/action...* > * > > > > Shalev NessAiver escreveu: > >> Try putting >> >> render_action "uploadframe" >> >> in your create_music method. >> >> It''s either that or some other "render_[something]" method. >> >> On Apr , 7 2005 2:44 PM, Pedro Valentini <pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> >> wrote: >> >>> Thank you, you save my life... >>> >>> But I stoped in other problem: >>> When *new_music* submit to *create_music*, create_music don''t show >>> the >>> layout, show only the content... but it isen''t in exept list of the >>> layout, *uploadframe* >>> How show the layout *uploadframe* in *create_music???* >>> >>> layout ''uploadframe'', :except=> [:new_music, :new_article] >>> And this controler have a def *create_music...* >>> >>> Pedro >>> >>> Duane Johnson escreveu: >>> >>> >>>> layout ''uploadframe'', :except=> [:new_music, :new_article] >>>> >>>> Don''t repeat yourself ;) >>>> >>>> Duane Johnson >>>> (canadaduane) >>>> >>>> >>>> >>> _______________________________________________ >>> 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 >> >> >> >> > > -- > > Pedro C. Valentini > pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org > +55 (21) 8708-8035 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Jarkko Laine http://jlaine.net http://odesign.fi _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails