Building a has_many, through model relationship and form with Cocoon

So, I’m working on a personal project to learn Ruby on Rails and the application structure that I desired required a complicated many-to-many relationship with a join model that itself contained data. This was a pretty complex model structure to setup and has numerous pitfall points that took a weekend of searching the Googles and reading a number of StackOverflow entries, GitHub gem documentation and RailsCasts to finally understand and get working the way I desired. Since all the documentation I found only dealt with small pieces of the whole and it took me all weekend to figure it out, I got to thinking there’s no way I’m the only one out there trying to grok this crap. So, now that I got it working, I’m going to share how the heck to do it so you can learn from my guinea pigging.

Continue reading “Building a has_many, through model relationship and form with Cocoon”

Time to Learn Something New!

I’ve taken it upon myself to start learning a new programming language and leaving my happy little LAMP (or preferably LNMP) comfort zone. I love PHP and how easy it is to get up and running. Its pretty simple and gets the job done quick. PHP unfortunately lacks a lot of the “grace” and modern nuances that a more modern platform such as Ruby on Rails provides.

Now, before the pitchforks start coming out I already know that I’m kind of comparing Apples to Apple Pie. PHP is a language with a ton of community support and Ruby on Rails is a framework. I get it, but there’s a lot to be desired in PHP land. PHP has some good frameworks as well – CakePHP, Zend, CodeIgniter, Yii, etc. – but the sheer variety creates a lot of discontinuity in the community and a lot of the frameworks out there are just Ruby on Rails wannabe’s anyways. More importantly besides any of that, PHP is getting a little boring and I want to learn something new ๐Ÿ™‚ So, I’m starting to learn Ruby, Sinatra and eventually Ruby on Rails and share my learning here.

Continue reading “Time to Learn Something New!”