Tag: ROR
-
Gem: Export to Excel
Creating excel spreadsheets (with charting) has never been easier. This looks like an amazing bit of code if you’re writing a data driven app that requires exporting to excel!
-
Rails Validating Field vs Association
One really interesting thing I came across recently is validating a field vs association. I’ve always written something like this (assume this is a… Company model with a attribute called owner_id and a belongs_to association called owner): What’s better to write is: This actually makes sure that your :owner_id actually maps to a real object in the database.…