This is great! I am a new Mac user and I love that the key combinations flash in the top right as you type. These are great Rails training videos. Thanks
Should controller names be singular (Project) and rather than plural (Projects)?
The convention is using a plural name for the controller (Projects).
Glad you find the videos useful. :)
It's really nice to have it all in one place. Now my code is a bit more DRY.
Thanks
Thanks for those wonderful videos you are sharing with us :)
I would like to know how "dynamic layouts", I would like to add the layouts in my database and then use them as layouts, how can I accomplice that?
I tried to do it as you showed us in the video as follow:
def user_layout
if current_user.admin?
@layout.find_by_name("Normal").htmlCode
else @layout.find_by_name("Default").htmlCode
end
But this isn't working as I excepted, I hope you would have the time to give some example how to develop that :) and thanks in advance for your help.
Nice screen cap, also if you use named spaced controllers, those child controllers inherit the layout of the parent class, very DRY.
Hey Ryan, do you know of a way, to use the Application Layout for one section all the time (say header and footer) and then use different layouts in the yielded section.
should i just use partials?
The fact is evident that noetic acts become adjusted to, by conscious conversion into the corresponding cogitationes, separated modes of consciousness.
Ryan,
Thanks for the railscasts! Awesome!
Could you post your application layout somewhere? It plus the CSS (which I grabbed from cast #58) make for a clean demo. But, I can't get the flash working right -- I always get a green and pink narrow band when the flash is empty. How do I make the flash_notice div go away when the flash is empty?
Thanks,
Bill
Ryan,
Nevermind. Seconds after posting, I realized I could actually use Ruby, what a concept, in my layout! DOH!.
I wrapped the divs in a <% unless flash[:notice].blank? %>
Thanks anyway,
Bill
Hello, I was doing a render layout thing, I found that for example if I put the render layout before any @abc = Abc.find(:all), this instance variable line won't work.
So failed is :
def translate
render :layout =>'app'
@pinyin = Pinyin.find(:all)
end
But succeeded is:
def translate
@pinyin = Pinyin.find(:all)
render :layout =>'app'
end
Does anyone know why this is?
Thanks a million!
Thanks Ryan!
Just the 'right' information and broken down perfectly.
Keep it up!
Thanks Ryan,I think this is one of the most wonderful sites. I have great admiration for you.
Thank you Ryan, your screencast is good. Please look at our URL, if necessary we can learn from each other.
Thank you for your informations, it is wonderful! I have admiration for you.


