Skip to content

Instantly share code, notes, and snippets.

@jocelynduc
Created June 13, 2014 14:44
Show Gist options
  • Save jocelynduc/3a34478ed3e7da3a0dcb to your computer and use it in GitHub Desktop.
Save jocelynduc/3a34478ed3e7da3a0dcb to your computer and use it in GitHub Desktop.
require 'active_record/connection_adapters/abstract/schema_definitions'
class ActiveRecord::ConnectionAdapters::TableDefinition
def publishing(*args)
options = args.extract_options!
column(:publish_up, :datetime, options)
column(:publish_down, :datetime, options)
end
end
@rowend
Copy link

rowend commented Jan 27, 2020

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment