RailsCasts (Mobile) show

RailsCasts (Mobile)

Summary: Every other week you will be treated to a new, free RailsCasts episode featuring tips and tricks with Ruby on Rails, the popular web development framework. These screencasts are short and focus on one technique so you can quickly move on to applying it to your own project. The topics are geared toward the intermediate Rails developer, but beginners and experts will get something out of it as well. A Pro option is also available containing more screencasts each week. This version is for mobile devices which cannot support the full resolution version.


 #16 Virtual Attributes | File Type: video/mp4 | Duration: 3:41

Keep your controllers clean and forms flexible by adding virtual attributes to your model. This very powerful technique allows you to create form fields which may not directly relate to the database.

 #15 Fun with Find Conditions | File Type: video/mp4 | Duration: 4:31

You can pass more than simple strings to find conditions. Arrays, ranges, and nil values can be passed as well. In this episode you will see the tricks involved with passing these odd objects to find conditions. (Update: audio fixed).

 #14 Performing Calculations on Models | File Type: video/mp4 | Duration: 2:57

Did you know ActiveRecord provides class methods for performing calculations on models? You can even use these methods through associations.

 #13 Dangers of Model in Session | File Type: video/mp4 | Duration: 5:17

Be careful when storing a model in a session. It will behave differently than you expect and can easily get out of sync with the database. Instead of storing the model directly in the session, store the id to the model and use that to fetch it from the database.

 #12 Refactoring User Name Part 3 | File Type: video/mp4 | Duration: 4:03

In the final part of this series you will see how to refactor your tests. Keeping tests clean is important because it will make testing easier to do in the future.

 #11 Refactoring User Name Part 2 | File Type: video/mp4 | Duration: 6:34

Testing and refactoring go hand in hand. Refactoring is all about improving code without changing its behavior. Testing is all about making sure you don't change the behavior while you are improving the code.

 #10 Refactoring User Name Part 1 | File Type: video/mp4 | Duration: 5:44

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.

 #9 Filtering Sensitive Logs | File Type: video/mp4 | Duration: 2:42

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.

 #8 Layouts and content_for | File Type: video/mp4 | Duration: 3:30

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.

 #7 All About Layouts | File Type: video/mp4 | Duration: 6:54

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.

 #6 Shortcut Blocks with Symbol to_proc | File Type: video/mp4 | Duration: 3:44

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

 #5 Using with_scope | File Type: video/mp4 | Duration: 2:50

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!

 #4 Move Find into Model | File Type: video/mp4 | Duration: 2:03

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.

 #3 Find Through Association | File Type: video/mp4 | Duration: 2:17

No need to pass foreign keys in find conditions, just do the find through a has_many association.

 #2 Dynamic find_by Methods | File Type: video/mp4 | Duration: 1:28

Shorten simple finds considerably and improve readability by using the dynamic find_all_by and find_by methods.


Login or signup comment.

Saumya says: