Ruby on Rails gotcha: updating child records with callbacks and nested attributes
I recently ran into a bit of a gotcha concerning the way nested records get updated in Rails, which in hindsight makes total sense, but caused some confusion at the time.
Generating PDFs in Rails with PDFKit and deploying to a server
I’ve been using the rather excellent PDFKit library on a recent Ruby on Rails project to generate PDF reports. The API is perfect: have some HTML, give me a PDF back.
ActionMailer link for a Rails app deployed in a sub-directory
I’ve just deployed a Ruby on Rails application in a sub-directory of a client’s website. So rather than accessing the app at www.example.com, you need to visit www.example.com/app. This was quite easy using an extra couple of lines in config.ru.
Where to find Rails’ default validation error messages
I’ve been playing around with simple_form and I18n in Rails a LOT in a recent project. I’ve been customising form labels and validation messages using the internationalisation features – it works really, really well. There is, however, one small problem. When you start, you are presented with an almost blank YAML file and some very flakey Read More »
Upgrading a Rails 3.0 project to Rails 3.1
I’ve just upgraded an old Ruby on Rails 3.0 project to the current 3.1 build. Having expected ours of pain I was very pleased to discover that it’s all terribly easy. Here’s the step by step (as ever YMMV depending on gems you have installed).
Things Storm bookmarked this week 04/01/12
2011: A polyglot programmers journey
At Storm we like our developers to be polyglot programmers. We believe knowing a wide range of languages, APIs and toolsets makes for better programmers and ultimately, better deliverables for clients. It means we can pick the most appropriate tool for a task and deliver an excellent final product. As the old saying goes, ‘if Read More »
Things Storm bookmarked this week 14/12/11
This week.. Scott: “An awesome video showing a cool proof of concept using 500 sensors with very small time delays to capture the path of small pulses of light travelling through objects” Adam: “I recently discovered nCrunch – a very elegant way to automatically run .NET unit tests within Visual Studio and have a visual indication Read More »
Things Storm bookmarked this week / 02-11-11
This week… Dave tells ms that iMessage is coming to OS X: “iMessage is Apple’s new messaging solution for the iPad, iPod Touch and iPhone found in iOS 5. It allows customers to send SMS-like messages over standard data connections rather than expensive text messaging plans.” Also: “AirPlay mirroring is going to mean that meetings Read More »
Things Storm bookmarked this week / 26-10-11
This week… Dave pointed me to the fact that Google have given their App Store a bit of a facelift. As he points out – “to say that it had a ‘hint of iTunes app store’ is possibly an understatement” – but he’s also right, it’s pretty well put together and always worth spending a Read More »