Web Development  >>  Ruby On Rails

Railscasts Week 3

Language : English Quality : High Has Audio : true Source : showmedo Media : Flash
Let Ryan Bates take you through a growing series of great Rails tips.

Tags: Ruby On Rails, Ruby, Web Development, Screencast, Showmedo, Filter, Log,     [SUGGEST  A  TAG]

Resources referenced in this screencast
  • Ruby on Rails
  • All About Layouts

    Everything you wanted to know about layouts: global layouts, controller layouts, shared layouts, dynamic layouts and action layouts. Yes, there really are that many ways to specify a layout.

    Layouts and content_for

    If you want to change something in the layout on a per-template basis, content_for is your answer! This allows templates to specify view code that can be placed anywhere in a layout.

    Filtering Sensitive Logs

    Are you accepting sensitive user data? Passwords, credit card numbers, etc. By default, Rails stores all submitted parameters in plain text in the logs. This episode will show you how to filter this sensitive input so it doesn't show up in the log file.


    Articles Realted to this Topic

    [SUGGEST  A  ARTICLE]
    content_for best practices
    wanting to keep DRY, i'm wondering what the best way is to use this is if i'm wanting to check specific areas for content. based on if there is or isn't, i would like to totally remove or add elements to the page.
    Filtered parameter logging
    ActionController#filter_parameter_logging lets you filter form data that you don't want saved in the log. This is useful for preventing sensitive data like passwords and credit card numbers from being logged in the clear, for keeping huge pieces of data from clogging the log file, and so on
    Securing your production.log
    By default Rails logs all your POST parameters in both development and production. If you are accepting credit card numbers, passwords or other sensitive information then all this data will end up in plain text in your production.log file. Not very cool.
    Best Practices of Sidebars & Layouts in Ruby on Rails
    This surprises even me, but I’m not sure what is the best way to provide multiple templates, sidebars, etc. (i.e. typical layout/templating stuff) before I read this. Formerly I exclusively use partials, now I know there’s another way, the content_for and yield. It’s not something that all beginner Railers know (including me) so I thought this’d be a great & very useful read