Videos tagged with Ruby
It is often asked: how do I create a list of checkboxes for managing a HABTM association? Ask no more because this episode will show you how to do exactly that.
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.
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.
Did you know ActiveRecord provides class methods for performing calculations on models? You can even use these methods through associations.
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.
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.
Last Thursday, March 15, Gregg Pollack gave a "Why Ruby on Rails?" presentation to the Orlando Ruby Users Group. He'd given an Introduction to Rails talks before, so he tried to shake this one up and make it as ranty and opinionated as possible (It's more entertaining that way). Over 45 people showed up to the meeting, and he tried my best to preach the word.
In this episode, Tom Werner covers some of the basics of the ruby image library ImageScience. ImageScience is a wrapper for the FreeImage graphics library, and is a lightweight alternative to RMagick.
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.
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.