Showing 246 videos tagged with rails

Railscast - Episode 1: Caching with Instance Variables

00:02:06 railscasts.com
Learn a quick way to improve performance. Just store the end result of an expensive command in an instance variable!

Railscast - Episode 2: Dynamic find_by Methods

00:01:28 railscasts.com
Shorten simple finds considerably and improve readability by using the dynamic find_all_by and find_by methods.

Railscast - Episode 3: Find Through Association

00:02:17 railscasts.com
No need to pass foreign keys in find conditions, just do the find through a has_many association.

Railscast - Episode 4: Move Find into Model

00:02:03 railscasts.com
Move a find into the model to clean up the controllers and remove duplication. Also see how you can call these custom find methods through an association.

Railscast - Episode 5: Using with_scope

00:02:50 railscasts.com
Learn how to use with_scope - a very powerful method which will allow your custom find methods to accept any find options. Just like magic!

Railscast - Episode 6: Shortcut Blocks with Symbol to_proc

00:03:44 railscasts.com
It may have a goofy syntax, but the Symbol#to_proc feature Rails adds allows you to do simple blocks very quickly and easily.

Railscast - Episode 7: All About Layouts

00:06:54 railscasts.com
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.

Railscast - Episode 8: Layouts and content_for

00:03:30 railscasts.com
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.

Railscast - Episode 9: Filtering Sensitive Logs

00:02:42 railscasts.com
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.

Railscast - Episode 10: Refactoring User Name Part 1

00:05:44 railscasts.com
Learn how to clean up your code through refactoring. This episode will show you how to move code from the view into the model to remove duplication and simplify the view.