RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: maxim
Ryan, it looks like in the second half of the episode you were really after ActiveRecord's to_partial_path, which you can define in Activity model and have it perform all of your path-building logic. It becomes a clear winner when you notice that
Makes more sense to have it come from inside the activity object itself. In the view you could then simply call render activity, and it would automatically call to_partial_path on the model. When this logic is moved into model like that, presenter is left somewhat empty, and in this specific case becomes excessive.
It's not bad, but you won't be able to modify variables, and extend css rules with other css rules. (The latter of which I was hoping Ryan would cover, but topic is too wide, and this cast is great still). Basically, with plain files you can't use any dynamic power of sass or less to modify things in bootstrap itself, only override the plain css.
The video is slightly cut-off at the end. Also the backbone-on-rails link in the show notes is pointing to another lib on github.
P.S. Great job as usual. Was meaning to play with backbone.