Skip to content

Instantly share code, notes, and snippets.

@sarogers
Created May 11, 2015 18:07
Show Gist options
  • Save sarogers/fcdaef9634212c896b31 to your computer and use it in GitHub Desktop.
Save sarogers/fcdaef9634212c896b31 to your computer and use it in GitHub Desktop.
# NOTE: All model inheriting this method must implement a #publish! method.
module Publishable
def publish_to!(batch)
publish_parents!(batch)
publish_children!(batch)
end
def publish!
raise 'implement publish! on the inheriting class'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment