Skip to content

Instantly share code, notes, and snippets.

View robjacoby's full-sized avatar

Rob Jacoby robjacoby

  • Melbourne, Australia
View GitHub Profile
@robjacoby
robjacoby / controller.rb
Created December 2, 2015 00:20
Lotus / JSONAPI / Reform Errors
ErrorsRepresenter.new(@operation.errors).to_json
@robjacoby
robjacoby / Dockerfile
Last active September 8, 2015 00:13
Ruby/Rails Dockerfiles
# ---------------------------------------------------------------------------
# This is the Dockerfile to build the base image for ruby/rails/mysql
# ---------------------------------------------------------------------------
FROM debian:jessie
MAINTAINER XXX
ENV REFRESHED_AT 2015-08-07
# ---------------------------------------------------------------------------
module Validatable
extend ActiveSupport::Concern
# Required dependency for ActiveModel::Errors
extend ActiveModel::Naming
def validate!
raise NotImplementedError, 'You need to implement this in the parent class'
end