Polymorphic Associations For Tools Like You
You think I’m going to back down on you being a tool? Think again, little Nancy. On your road to becoming a RubyOnRails programmer made of lightning, you need to learn a bit about polymorphic associations. What are they? It’s a simple way of associating one class to multiple classes. “But kris, I already have [...]
RubyOnRails Route Generation Awesomeness
Before I decided to leave work, I wanted to get this photo album system started. It’s polymorphic and allows users, videos, etc, to all have albums. I wanted to use a single controller, views, etc. Well, I never knew that you could do the following:
1<%= link_to ‘Back’, [:admin, @parent, :albums] %>
Assuming @parent is the parent [...]
