This commit by Grant Hutchins & Peter Jaros back in July 2011 gives ActiveModels the ability to define their own partial paths by implementing a to_partial_path method. (You can find a great explanation of this killer new feature on José Valim's blog post about it . Just scroll down to #4 Custom Partial Paths.)
I'm blogging about it here, because it impacts a technique that I described in May 2011 as Rendering Heterogeneous Collections of Objects …
…model.class.model name.partial path . Grant Hutchins & Peter Jaros noticed that this was not very flexible because the class was responsible to define the partial path and therefore they decided to move this responsibility to the instance. In order to better understand how you can use this feature, let's consider the following practical example.
Imagine your application have an activity feed and each activity in the feed has a certain type. Usually, each type is rendered …
rspec-core-2.6.0
Enhancements
shared context ( Damian Nurzynski)
extend groups matching specific metadata with:
method definitions
subject declarations
let/let! declarations
etc (anything you can do in a group)
its([:key]) works for any subject with #[]. ( Peter Jaros)
treat symbols as metadata keys with true values ( Myron Marston)
Print a deprecation warning when you configure RSpec after defining an example. All configuration should happen before any examples are defined. ( Myron Marston)