If you've worked in a Rails project before, you've undoubtedly set up associations beteween your models. Active Record provides a clean and simple way in setting up these associations, while hiding a lot of the complexity behind the scenes.
Building the living style guide for CustomInk's new mobile/responsive sites required that we stand on the shoulders of other great frameworks. All of them well authored and hence well tested. But as we built more tools on top of these giants, we felt the need to test our own framework's code and thus began the search for Sass/CSS testing methods. After surveying the current state of testing, I found myself let down. To be fair, there are some really clever...
Ruby metaprogramming is fun and very rewarding, but also a little bewildering. One of the great things about Ruby is that you can dynamically add methods to objects. Ruby gives us #eval, #instance_eval, and #class_eval for this purpose, but the names aren’t as clear as one might expect, and can lead to some confusion. Hopefully the code examples below help clarify how each is used, and get on on the way to meta-mastery.
When upgrading a high-traffic Rails application from 3.0.x to 3.2.x, existing sessions with Flash data will raise dump format error during the session unmarshalling step of the users next request. For an ostensibly minor patch (see semver), breaking user sessions is an unexpected surprise and a real bummer for your users. The Rails breaking change to FlashHash was to stop inheriting from Hash: # Rails 3.0 - See: http://git.io/X8WqIw class FlashHash < Hash # Rails 3.2 - See: http://git.io/jJ_Qhw class...
As I have mentioned previously in my post on Modular CSS, structuring Sass/CSS is hard. One of the best ways to determine how clean and well structured the resulting CSS within a project is, is to take a look at the markup being used in project. Overly nested elements typically mean overly nested CSS and if you find it difficult to discern the purpose of the classes on those elements, the CSS itself is probably not semantically written. To add...
Last week I set out to upgrade HomeMarks, a personal bookmarking project of mine. This application sat on a very recent upgrade to Rails 3.2. It is written as an API to both an iOS and HTML JavaScript interface. It is by no means huge and should represent a nominal service oriented application. Here are some stats: 8 Models (450 LOC) 11 Controllers (550 LOC) 2 Mailers (50 LOC) 8 Libraries (500 LOC) Using Ruby 2.1.2. The application is heavily...
Fall is in the air and so our engineers will be heading back to college!
We are looking for Summer 2015 interns and early career software engineer hires. You can learn more about our early career software engineer position by visiting our careers page: http://www.customink.com/about/jobs/openings