Search the web
Sign In
New User? Sign Up
rails_artist · Only Ruby on Rails Artist here
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
where to invoke "layout"? AppllicationController or ChildController?   Message List  
Reply | Forward Message #7 of 23 |
these days i am having a lot of fun with Ruby on Rails. it seems to be
like an open ground with lot of handful tools, now come up with ideas
and build them up.

handful ruby based tools really helping me to let my smile back.
anyway, while i was writing code on rails i am feeling something can
be better practice something is not good. from now on, i will try to
put them over the my blog.

their is method called "layout" which is used to define the based
layout for the controller. this can be used from ApplicationController
and other domain specific controller for example : "UserController".

my team and me was used to define layout over the domain specific
controller, but i belief, as we are repeating same "layout
'template1'" code over and over, it must be better to keep inside the
ApplicationController, as because all domain specific controllers are
extending application controller, more over it is easy to change.

you may get a question about ajax based response, the better answer
is, use render .., layout => false, that will get rid of base layout.

best wishes,





--
----------------------------------------------------
nhm tanveer hossain khan (hasan)
http://hasan.we4tech.com
----------------------------------------------------
mobile: +880 1713 090 511
----------------------------------------------------
"work for fun"



Sat Oct 6, 2007 1:50 pm

hasan83bd
Offline Offline
Send Email Send Email

Forward
Message #7 of 23 |
Expand Messages Author Sort by Date

these days i am having a lot of fun with Ruby on Rails. it seems to be like an open ground with lot of handful tools, now come up with ideas and build them up....
nhm tanveer hossain k...
hasan83bd
Offline Send Email
Oct 6, 2007
1:50 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help