|
You are here |
www.destroyallsoftware.com | ||
| | | | |
thomascountz.com
|
|
| | | | | Adding Functionality to Client Classes The first step in tackling this problem is to add functionality to a model class. If we have a class Book, we want to add a class method Book.find , and some instance methods book#title, book#author, and book#isbn, without needed to explicitly write them, like we did in the original spike. A Note on Mix-Ins & Inheritance When you want to create a model with ActiveRecord, you have to inherit from the Base module: class Book < ActiveRecord::Base; end There are endless debates about composition v. inheritance, and, from my perspective, they all mostly lean towards composition, but what about using mix-ins versus using string inheritance? In Ruby, inheriting and including a module both add a new entity in the method look-up... | |
| | | | |
kinduff.com
|
|
| | | | | This coding adventure explores how to fix a pain point behind the simple method I18n#t that we use on Ruby applications. | |
| | | | |
endofline.wordpress.com
|
|
| | | | | This article has been republished on Monkey and Crow. As of ruby 1.9, you can do some pretty odd things with array destructuring and splatting. Putting the star before an object invokes the splat operator, which has a variety of effects. First we'll start with some very useful examples, then we will poke around the... | |
| | | | |
blog.jorgenschaefer.de
|
|
| | | Version 1.2 of Circe, the Client for IRC in Emacs, has been released. Read more about Circe on its homepage: https://github.com/jorgenschae... | ||