Article 4
Rails, as_json, undefined method `serializable_hash' as_json was failing in one of my Rails models with: NoMethodError: undefined method `serializable_hash' for ["id", 3]:Array Eventually figured out...
View ArticleRails.root is the new Rails.configuration.root_path
In older versions of Rails the Rails.configuration.root_path method would give you the base directory of your application in the filesystem. In Rails 3 this is now Rails.root.
View ArticleRails, simple_form, Twitter Bootstrap, and append
I wanted to put a little delete button at the end of a form field. We start with the standard simple_form syntax for a form field. <%= f.input :name %> The generated HTML has the form elements...
View ArticleReporting Input Errors from a Rails Model
There are several places outside of the standard validations where you might process user input in a Rails model and want to inform the user that they supplied bad data. It is not immediately obvious...
View ArticleRaspberry Pi, Raspian Debian Wheezy, Boot Single User Mode
In short, eject the SD card from your Pi, mount it somewhere, and add "single" to the end of cmdline.txt. I was able to stick the card in my Mac and edit the file. Eject the card from that computer,...
View ArticleKerberos propagation and unusual networking
My Kerberos servers are scattered around the Internet, behind NAT in some cases, connected with VPNs, etc. As such the hostname or IP that one server might use to connect to another is often different...
View Article